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