=pod =head1 NAME artemus - Text substitution tool and much more =head1 SYNOPSIS # substitutes text artemus -i|--input={input file} -o|--output={output file} [-c|--conf={config file}] [-p|--paragraph={paragraph_separator}] [-m|--msdos] [-a|--append] =head1 DESCRIPTION B is a text substitution tool (thought mainly for preprocessing HTML). Macros are defined in the file F, in the form B, being B the destination text, that can have parameters. The macro is included in the source file between the B<{-> and B<}> marks. The (possible) parameters are delimited by the B<|> symbol. Examples: In F file: # some simple definitions Perl=Perl LWN=Linux Weekly News separator=


head= # definitions with parameters # generic link link=$0 # generic meta meta= # link using the link macro CPAN={-link|CPAN|www.cpan.org} In a source file F: {-head} {-meta|links, free software|keywords}

Links

  • {-Perl}
  • {-LWN}
  • {-CPAN}
  • {-link|kernel.org|www.kernel.org}
{-separator} By running artemus -i index.artemus -o index.html you obtain the file F:

Links




The I<--paragraph> argument let us define a string to substitute the empty lines in the document. If defined as

, you can create HTML documents separating the paragraphs with only a blank line, as B will fill them with

. The I<--msdos> argument creates the typical MSDOS end of line, CR+LF. The I<--append> argument appends the output to destination file, instead of overwriting it. =head1 AUTHOR (C) Angel Ortega 2000/2008 =cut