5 artemus - Text substitution tool and much more
9 artemus -i|--input={input file} -o|--output={output file}
10 [-c|--conf={config file}]
11 [-p|--paragraph={paragraph_separator}]
12 [-m|--msdos] [-a|--append]
16 B<artemus> is a text substitution tool (thought mainly for preprocessing HTML).
17 Macros are defined in the file F<artemus.conf>, in the form B<key=value>,
18 being B<value> the destination text, that can have parameters. The macro is
19 included in the source file between the B<{-> and B<}> marks. The (possible)
20 parameters are delimited by the B<|> symbol.
24 In F<artemus.conf> file:
27 # some simple definitions
28 Perl=<a href="http://www.perl.com">Perl</a>
29 LWN=<a href="http://www.lwn.net">Linux Weekly News</a>
30 separator=<br><hr><br>
31 head=<html><body bgcolor=ffffff>
33 # definitions with parameters
35 link=<a href="http://$1">$0</a>
37 meta=<meta name="$1" content="$0">
38 # link using the link macro
39 CPAN={-link|CPAN|www.cpan.org}
41 In a source file F<index.artemus>:
44 {-meta|links, free software|keywords}
50 <li>{-link|kernel.org|www.kernel.org}
56 artemus -i index.artemus -o index.html
58 you obtain the file F<index.html>:
60 <html><body bgcolor=ffffff>
61 <meta name="keywords" content="links, free software">
64 <li><a href="http://www.perl.com">Perl</a>
65 <li><a href="http://www.lwn.net">Linux Weekly News</a>
66 <li><a href="http://www.cpan.org">CPAN</a>
67 <li><a href="http://www.kernel.org">kernel.org</a>
71 The I<--paragraph> argument let us define a string to substitute the empty
72 lines in the document. If defined as <p>, you can create HTML documents
73 separating the paragraphs with only a blank line, as B<artemus> will fill
76 The I<--msdos> argument creates the typical MSDOS end of line, CR+LF.
78 The I<--append> argument appends the output to destination file, instead
83 (C) Angel Ortega <angel@triptico.com> 2000/2008