#! /usr/bin/perl while($file = shift) { open (FILE, $file) or warn "can't open $file"; open (NEWF, ">$file.new") or warn "can't open $file.new"; while () { s/\[br\]/\/i; if (/alt=\"/){ @tokens = split /\"/; $title = $tokens[3]; #print "title: $title\n"; } if (/\<\/body\>/i){ print NEWF "
 \n

[View/Post Comments]

\n"; } if (/\<\/html\>/i) { print NEWF "

 

\n"; print NEWF "
\n"; print NEWF "Photos by Celeste Hutchins
\n"; print NEWF "\n"; print NEWF "\"Creative
\n"; print NEWF "This work is licensed under a Creative Commons License.\n"; print NEWF "\n\n\n"; print NEWF "\n
\n\n"; print NEWF "Blog: celesteh.blogspot.com
\n"; print NEWF "Professional: www.berkeleynoise.com/celesteh
\n"; print NEWF "Photo Update Announcement Feed: www.celesteh.com/pics/atom.xml\n"; print NEWF "
\n"; } print NEWF $_; } close FILE; close NEWF; rename "$file.new", $file; }