2# first argument is input filename - a demo template.
3# second argument is output filename.
8open( IN, "< $infile" );
9open( OUT, "> $outfile" );
14 my $firstchar = substr ($line,0,1);
15 if ( $firstchar eq '@' ) {
16 my $command = substr ($line,4);
17 my $commandExec = $command;
18 $commandExec =~ s/[#].*$//g; # strip off comments
19 $commandExec =~ s/@@//g; # strip off hotlink markers
20 print STDERR "$commandExec";
21 system "$commandExec";
24 $line =~ s/@@([^@]*)@@/<a href="$1">$1<\/a>/g;
25 $line =~ s/-/\\-/g; # to prevent smart dashes!
26 $line =~ s/^(.*)$/ <pre><code>$1<\/code><\/pre>/g;
27 if ( $line =~ /(example\d+\.html)<\/a><\/code>/m ) {
28 $line .= "\n (View [`$1` as a web page]($1).)\n";
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list