The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

pod2ooo - converts a .pod file to a .sxw OpenOffice.org Writer file

SYNOPSIS

    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

DESCRIPTION

This program merges the contents of a POD file into an OpenOffice.org Writer file, generating another OOo file.

Preparing the template

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#.

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.

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.

For numbered lists, use tokens #ol1# to #ol2#.

A basic template example is included in directory eg/ of the source distribution.

Keyword substitution

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.

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

    TITLE : Testing Pod::OOoWriter

    AUTHOR: Cédric Bouvier

    =end

Keywords are case-sensitive, and should match /^\w+$/ (i.e., only letters, digits and underscores).

The parsing

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.

OPTIONS

-i FILE, --infile=FILE

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.

-o FILE, --outfile=FILE

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.

-t FILE, --template=FILE

Specify the location of the OpenOffice.org Writer template.

-v, --version

Prints the program's version and exits.

-h, --help

Prints a help message and exits.

SEE ALSO

perlpod, Pod::OOoWriter

AUTHOR

Copyright © 2004

Cédric Bouvier <cbouvi@cpan.org>

1 POD Error

The following errors were encountered while parsing the POD:

Around line 130:

Non-ASCII character seen before =encoding in 'Cédric'. Assuming CP1252