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]
16 artemus -f|--ftp {files to ftp...}
18 # creates a template makefile for html projects
19 artemus -k|--makefile > Makefile
21 # builds a site map page
22 artemus -s|--site-map {Directories} > sitemap/index.artemus
26 B<artemus> is a text substitution tool (thought mainly for preprocessing HTML).
27 Macros are defined in the file F<artemus.conf>, in the form B<key=value>,
28 being B<value> the destination text, that can have parameters. The macro is
29 included in the source file between the B<{-> and B<}> marks. The (possible)
30 parameters are delimited by the B<|> symbol.
34 In F<artemus.conf> file:
36 # some simple definitions
37 Perl=<a href="http://www.perl.com">Perl</a>
38 LWN=<a href="http://www.lwn.net">Linux Weekly News</a>
39 separator=<br><hr><br>
40 head=<html><body bgcolor=ffffff>
42 # definitions with parameters
44 link=<a href="http://$1">$0</a>
46 meta=<meta name="$1" content="$0">
47 # link using the link macro
48 CPAN={-link|CPAN|www.cpan.org}
50 In a source file F<index.artemus>:
53 {-meta|links, free software|keywords}
59 <li>{-link|kernel.org|www.kernel.org}
65 artemus -i index.artemus -o index.html
67 you obtain the file F<index.html>:
69 <html><body bgcolor=ffffff>
70 <meta name="keywords" content="links, free software">
73 <li><a href="http://www.perl.com">Perl</a>
74 <li><a href="http://www.lwn.net">Linux Weekly News</a>
75 <li><a href="http://www.cpan.org">CPAN</a>
76 <li><a href="http://www.kernel.org">kernel.org</a>
80 The I<--paragraph> argument let us define a string to substitute the empty
81 lines in the document. If defined as <p>, you can create HTML documents
82 separating the paragraphs with only a blank line, as B<artemus> will fill
85 The I<--msdos> argument creates the typical MSDOS end of line, CR+LF.
87 The I<--append> argument appends the output to destination file, instead
90 The I<--makefile> argument creates a typical makefile for artemus-based
91 HTML projects (including building and ftp-uploading rules). You must
92 modify it to suit your needs.
94 The I<--site-map> argument walks the directories sent as arguments searching
95 for HTML files and sends to standard output the map of the site. As header
96 and footer it creates the special B<artemus> tags B<site-map-head> and
97 B<site-map-foot>, that must be defined in F<artemus.conf>. A typical
100 site-map-head={-head|Site Map}
101 site-map-foot={-foot}
105 B<artemus> includes, since version 2.04, ftp capabilities to send the files
106 specified as arguments to a server defined in F<artemus.conf>. The entries
107 in this file must be:
112 ftp.dir=<destination directory (optional)>
114 Note that including this information in F<artemus.conf> makes it
119 (C) Angel Ortega <angel@triptico.com> 2000/2003