pod2ooo - converts a .pod file to a .sxw OpenOffice.org Writer file
pod2ooo --template=template.sxw --infile=in.pod --outfile=out.sxw pod2ooo -t template.sxw -i in.pod -o out.sxw
Output to in.sxw:
pod2ooo -t template.sxw -i in.pod
This program merges the contents of a POD file into an OpenOffice.org Writer file, generating another OOo file.
The template should contain markup that tells Pod::OOoWriter what formatting to apply when it encounters a given POD directive.
The template must thus contain sample paragraphs in heading style, level 1 to 4. These paragraphs must contain the tokens #head1# to #head4# respectively. This way, when Pod::OOoWriter encounters a =head2 directive, it will apply the same style than that of the paragraph that contained the token #head2#.
#head1#
#head4#
=head2
#head2#
Similarly, sample paragraphs must be provided for normal text, including the token #para#, and for verbatim text, including the token #verbatim#. The sample normal paragraph should also contain tokens #bold#, #italic#, #file# and #code#, in character styles that denote, respectively, bold, italic, file names or paths, and code snippets or identifiers.
#para#
#verbatim#
#bold#
#italic#
#file#
#code#
Samples should also be provided for bulleted, unordered lists, in levels 1 to 3, containing the tokens #over4# to #over6#. 4 is the default indentation level for the =over directive, hence the seemingly weird choice of tokens. Alternatively, #ul1# to #ul3 can be used instead.
#over4#
#over6#
=over
#ul1#
#ul3
For numbered lists, use tokens #ol1# to #ol2#.
#ol1#
#ol2#
A basic template example is included in directory eg/ of the source distribution.
Keywords surrounded by double hashes (e.g. ##KEYWORD##) can be included anywhere in the OOo template: in the text, in the page headers and footers or in the document's properties. This allows for defining the document's title, or the author, or the address of the company producing it, etc.
##KEYWORD##
Values for the keywords must be defined in the POD itself, in a =begin OOoWriter section. Each paragraph with such a section will be parsed as a key/value pair, separated by a colon (whitespace on either side of the colon is allowed and optionnal).
=begin OOoWriter
=begin OOoWriter TITLE : Testing Pod::OOoWriter AUTHOR: Cédric Bouvier =end
Keywords are case-sensitive, and should match /^\w+$/ (i.e., only letters, digits and underscores).
/^\w+$/
Pod::OOoWriter starts by parsing the template in search for the #head1# token. Anything before that is copied verbatim to the output. This means that the template can contain a front page, or a table of contents, as long as they appear before the token #head1#.
Once #head1# is found, the rest of the template is still parsed in search for the other tokens, but it is no longer copied to the output. Instead, the output consists of the POD document, with styles applied according to the tokens found in the template.
Once the template has been parsed and the POD text merged within, the keyword substitution occurs.
Specify the POD file to convert. When missing, the first argument is taken, i.e., these two lines are equivalent:
pod2ooo -t template.sxw -i in.pod pod2ooo -t template.sxw in.pod
When both the --infile option and the first argument are missing, the POD is read from standard input.
--infile
Specify the OpenOffice.org Writer file to create. When missing, the second argument is argument is taken, or the first one when --infile is specified. These are equivalent:
pod2ooo -t template.sxw -o out.sxw -i in.pod pod2ooo -t template.sxw -o out.sxw in.pod pod2ooo -t template.sxw in.pod out.sxw
When both the --outfile option and the second argument are missing, the output file is computed from the --infile, by removing the .pod extension if any, and appending .sxw. This will not work when read from standard input, as --outfile must be a real file.
--outfile
.pod
.sxw
Specify the location of the OpenOffice.org Writer template.
Prints the program's version and exits.
Prints a help message and exits.
perlpod, Pod::OOoWriter
Copyright © 2004
Cédric Bouvier <cbouvi@cpan.org>
1 POD Error
The following errors were encountered while parsing the POD:
Non-ASCII character seen before =encoding in 'Cédric'. Assuming CP1252
To install Pod::OOoWriter, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Pod::OOoWriter
CPAN shell
perl -MCPAN -e shell install Pod::OOoWriter
For more information on module installation, please visit the detailed CPAN module installation guide.