User: adrian
Date: 06/02/12 17:11:15
Modified: xemacs-builds/adrian/website avail2table.pl
Log:
xemacs-builds: Add usage message and production note to adrian/website/avail2table.pl
-------------------- ChangeLog entries follow: --------------------
ChangeLog addition:
2006-02-12 Adrian Aichner <adrian(a)xemacs.org>
* adrian/website/avail2table.pl: Add usage message and production
note.
* adrian/website/avail2table.pl (main): Call usage, if
appropriate, add production note HTML comment to output.
* adrian/website/avail2table.pl (usage): New.
Revision Changes Path
1.72 +8 -0 XEmacs/xemacs-builds/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs-builds/ChangeLog,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -p -r1.71 -r1.72
--- ChangeLog 2006/01/06 11:49:47 1.71
+++ ChangeLog 2006/02/12 16:11:14 1.72
@@ -1,3 +1,11 @@
+2006-02-12 Adrian Aichner <adrian(a)xemacs.org>
+
+ * adrian/website/avail2table.pl: Add usage message and production
+ note.
+ * adrian/website/avail2table.pl (main): Call usage, if
+ appropriate, add production note HTML comment to output.
+ * adrian/website/avail2table.pl (usage): New.
+
2006-01-06 Adrian Aichner <adrian(a)xemacs.org>
* adrian/website/package-get-2-download-sites.el
1.3 +28 -4 XEmacs/xemacs-builds/adrian/website/avail2table.pl
Index: avail2table.pl
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs-builds/adrian/website/avail2table.pl,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -p -r1.2 -r1.3
--- avail2table.pl 2004/06/06 16:23:03 1.2
+++ avail2table.pl 2006/02/12 16:11:15 1.3
@@ -2,8 +2,11 @@ use strict;
use Getopt::Long;
use Data::Dumper;
+my $ID = '$Id: avail2table.pl,v 1.3 2006/02/12 16:11:15 adrian Exp $';
-# Generate HTML table with users able to commit CVS repository directory.
+# Generate HTML table with users able to commit to CVS repository path
+# directly according to avail definitions provided as commend-line
+# argument.
# I use this from ...\xemacs-builds\adrian\website as follows:
# c:\Perl\bin\perl.exe -w "avail2table.pl" -path XEmacs/xemacsweb
../../../CVSROOT/avail
@@ -13,8 +16,10 @@ use vars qw(
);
sub main {
- GetOptions('path=s');
-
+ my (@cmd_line) = ($0, @ARGV);
+ if (!GetOptions('path=s')) {
+ usage();
+ }
unless (scalar @ARGV) {
@ARGV = ("c:\\Hacking\\cvs.xemacs.org\\XEmacs\\CVSROOT\\avail");
}
@@ -51,7 +56,10 @@ sub main {
my $n = scalar(@authorized_users);
my $int_sqrt_n = int(sqrt($n));
# print "n=$n, int_sqrt_n=$int_sqrt_n\n";
-
+ $ID =~ s'\$''g;
+ my $produced_by = sprintf(" <!-- Produced by:\n @cmd_line\n $ID\n at %s
-->",
+ gmtime() . " UTC");
+ print "$produced_by\n";
printf(" <table border=\"1\">\n");
printf(" <tbody>\n");
for (my $i = 0; $i < $n; $i++) {
@@ -67,6 +75,22 @@ sub main {
}
printf(" </tbody>\n");
printf(" </table>\n");
+}
+
+sub usage {
+ die( "Usage: perl $0 -path PATH [FILE ...]
+
+Generate HTML table with users able to commit to CVS repository path
+directly according to avail definitions provided as command-line
+argument.
+This table is suitable to be merged to xemacsweb/About/Website.content.
+
+-path PATH
+ The XEmacs CVS module path (starting with top-level module name)
+ to test availability for.
+
+" );
+
}
main();
Show replies by date