cvs commit: www cl2html.pl

lizardo at linuxfromscratch.org lizardo at linuxfromscratch.org
Sat Sep 20 10:50:33 PDT 2003


lizardo     03/09/20 11:50:33

  Modified:    .        cl2html.pl
  Log:
  cl2html.pl: Updated to output only the last 10 CVS changes.
  
  Revision  Changes    Path
  1.4       +7 -0      www/cl2html.pl
  
  Index: cl2html.pl
  ===================================================================
  RCS file: /home/cvsroot/www/cl2html.pl,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- cl2html.pl	30 Aug 2003 20:23:25 -0000	1.3
  +++ cl2html.pl	20 Sep 2003 17:50:33 -0000	1.4
  @@ -26,6 +26,9 @@
   
   my $my_version = "0.2";
   
  +# Output only the last $entries_limit CVS changes
  +my $entries_limit = 10;
  +
   # Convert ISO 8601 date (yyyy-mm-dd) to the specified format
   sub isodate2any {
       my ($date, $format) = @_;
  @@ -66,7 +69,11 @@
   my @messages = (); # Commit messages of the same author
   my $files = "";    # Files affected by CVS change
   
  +my $entry_count = 0;
  +
   sub print_log {
  +    exit 0 if $entry_count++ == $entries_limit;
  +
       print "<ul>\n\t<li>\n\t\t<h4>" . $author . " - " .
       isodate2any($date, '%Y/%m/%d') . "</h4>\n";
       print "\t\t<ul>\n";
  
  
  



More information about the website mailing list