p4_changes_2_html #3

  • //
  • guest/
  • barrie_slaymaker/
  • safari/
  • src/
  • conf/
  • bin/
  • p4_changes_2_html
  • View
  • Commits
  • Open Download .zip Download (922 B)
#!/usr/bin/perl -w

#
# p4_changes_2_html for Safari
# Copyright (c) 1999 by Barrie Slaymaker, rbs@telerama.com
#
# You may distribute under the terms of either the GNU General Public
# License or the Artistic License, as specified in the README file.
#

use strict ;
use HTML::Entities qw( encode_entities ) ;


my $up_to_project = $ENV{SAF_UP_TO_PROJECT} ;

my @output ;
while (<>) {
   chomp ;
   if ( m/^(.*)(Change\s+)(\d+)(.*)/ ) {
      $_ = join( '', 
         encode_entities( $1 ),
         qq{<A HREF="$3.html">},
         encode_entities( $2 . $3 ),
         qq{</A> [ <A HREF="$up_to_project\@$3/Default/">Browse</A> ]},
         encode_entities( $4 ),
      ) ;
   }
   else {
      $_ = encode_entities( $_ ) ;
   }
   push( @output, $_ ) ;
}

print <<TOHERE ;
<HTML>
<HEAD>
   <TITLE>Changes</TITLE>
</HEAD>
<BODY>
TOHERE

print( join( "<BR>\n", @output ) ) ;

print <<TOHERE ;
</BODY>
</HTML>
TOHERE

0 ;
# Change User Description Committed
#3 168 Barrie Slaymaker Added YAPC paper, slides
#2 165 Barrie Slaymaker Applied Greg KH's license patch.
#1 162 Barrie Slaymaker First code & documentation checkin