diff options
| author | B. Watson <urchlay@slackware.uk> | 2026-10-19 05:06:29 -0400 |
|---|---|---|
| committer | B. Watson <urchlay@slackware.uk> | 2026-10-19 05:07:15 -0400 |
| commit | eaee6e72caaf08e5201bea48e3dfe3fe7b47513b (patch) | |
| tree | 62b8e2172a3b93ddb74655c91b49944f9560dc15 | |
| parent | 1dcc0ee0e95e52ab149f45bccf3fba3dc00e8f95 (diff) | |
| download | greypool-eaee6e72caaf08e5201bea48e3dfe3fe7b47513b.tar.gz | |
Add -a/--all, -s/--stylesheet options. Document transform config file directive.
| -rwxr-xr-x | greypool | 44 |
1 files changed, 44 insertions, 0 deletions
@@ -68,6 +68,8 @@ sub read_file { sub parse_opts { Getopt::Long::Configure("bundling"); GetOptions( + "all|a" => \$show_all, + "stylesheet|s" => \$css_file, "verbose|v" => sub { $verbosity = 2; }, "force|f" => \$force_download, "html|h" => \$html, @@ -456,6 +458,7 @@ sub transformed_versions_eq { } sub ignored_or_masked { + return 0 if $show_all; my $i = shift; for(qw/name projname/) { @@ -583,6 +586,7 @@ sub generate_report { ####### report printing stuff sub create_default_css { + debug "$css_file doesn't exist, creating"; open my $f, ">$css_file" or fatal "$css_file: $!"; print $f <<EOF; body { color: #ffffff; background-color: #000000; } @@ -602,6 +606,7 @@ sub print_css { if(! -e $css_file) { create_default_css(); } + debug "reading stylesheet from $css_file"; print read_file($css_file); } @@ -755,6 +760,11 @@ Bundling options is supported, e.g. B<-qf> is the same as B<-q -f>. =over 4 +=item B<-a>, B<--all> + +Show all packages; ignore any I<ignore> or I<mask> directives in +the config file. + =item B<-c>, B<--color>, B<--colour> Colorize the output. For HTML output, this is already the default. For @@ -801,6 +811,14 @@ Comma-separated value output. The first line is a "header" with the field names; the rest of the output is one line per package. This would fail if someone put a comma in a version number... I<*shrug*> +=item B<-s> I<css-file>, B<--stylesheet> I<css-file> + +Embed I<css-file> in the HTML report. Default is +B<~/.greypool/style.css>. Has no effect without the B<--html> +option. If the file doesn't exist, it will be created, with the +default stylesheet. Note that there's no support for an external +stylesheet (e.g. B<<link stylesheet="...">>). + =item B<-q>, B<--quiet> Don't print any messages to standard error, except errors and @@ -901,6 +919,26 @@ Multiple versions can be listed on one mask line: mask somepackage 1.2 1.3 1.4 +=item B<transform> + +Sometimes, repology's version number for a project doesn't quite +match the version number you used for your package, even though +they're the same version. Example: your "foo" version number is +1.2.3+20260101, for a package that's built from the 1.2.3 source +plus the latest patches from upstream git as of Jan 1, 2026. +But repology lists it simply as 20260101. You can work around +this, like so: + + transform foo s/1\.2\.3\+// + +Note that the last argument is executable Perl code. If it's not valid +Perl, B<greypool> will show an error message and fail to run. + +You're expected to use a simple regex substitution here. Yes, you +could insert any code you wanted to, which can cause all kinds of +problems. So don't do that unless you I<really> know what you're doing +and have a I<very> good reason for it. + =item B<pkgurl> Optional. When generating HTML output, if this is set, the distro @@ -964,6 +1002,12 @@ create it, with default settings for a custom user agent and with gzip compression enabled. Ideally, you shouldn't need to change anything here, but it's available if needed. +=item B<style.css> + +The default stylesheet to embed in the HTML report. Will be created +the first time it's needed, if it doesn't exist. This can be changed +with the B<-s> / B<--stylesheet> option. + =item B<cache/> Contains one cache directory per email address that's been checked. |
