Bourne Shell powered zero-conf static site generator, gopher log phriendly, & ultra portable - originally created to create simple www web logs turns out to work pretty darn well for phlogs. use. fork. enjoy! (now the Official Repo!) :E
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
497 B

#!/bin/env perl
use strict;
use warnings;
# toy filter that replaces USC with an img tag
my $FORMAT_FUNC = $ARGV[0]; # name of format function is passed in
while(<STDIN>) {
chomp;
if ($_ =~ s/USC/<img src=http:\/\/www.emaspro.com\/Portals\/0\/images\/Logo\%20-\%20USC.jpg>/g ) {
# argv[0] is the name of the formatting function
if ($FORMAT_FUNC =~ m/groff/) {
printf("'nf\n%s\n'fi\n",$_);
} else {
printf("%s\n",$_);
}
} else {
printf("%s\n",$_);
}
}