NAME
textile2x - Convert Textile markup from the command-line
SYNOPSIS
# Each of these does the exact same thing
textile2x --input README.textile --output README
textile2x < README.textile > README
textile2x --convert README.textile=README
DESCRIPTION
textile2x is a simple script that converts Textile markup to any of the formats supported by the Text-Textile-Plaintext
CPAN distribution. Currently, the list of formats includes:
One or more inputs can be converted at a time, and not all inputs have to be converted to the same output format. See "OPTIONS".
Depending on the command-line options, input may be redirected from STDIN, and output may be redirected to STDOUT.
OPTIONS
The following options are recognized by textile2x:
- --format FORMAT
-
Specifies the default format for conversions. The default conversion format is
plaintext
. The allowable values are:- plaintext
- postscript
- rtf
-
The argument to
--format
is not case-sensitive.
- --input FILE
-
Specify a file to read from. If this option is not present and there are no instances of the
--convert
option, then standard-input is read. - --output FILE
-
Specify the file to write to. If this option is not present and there are no instances of the
--convert
option, then the converted content is written to standard-output. - --convert NAME[=NAME]
-
This option may appear more than once, to allow multiple conversions done in a single invocation of the tool.
Each name provided is read as Textile content, and converted. If a second name is provided (using
=
to separate them, no spaces are allowed between the names and the=
), it is used as the output destination. If the output file has a suffix, it is used to determine the format of the output:- .txt
-
Output will be
plaintext
. - .ps
-
Output will be
postscript
. - .rtf
-
Output will be
rtf
(Rich-Text Format).
If no output name is given, the input name is used. Any suffix it has is removed, and a suffix corresponding to the default format (as specified by the
--format
option, or defaulting toplaintext
) is used. - --help
-
Displays a short help-message with a summary of the options.
BUGS
Please report any bugs or feature requests to bug-text-textile-plaintext at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Text-Textile-Plaintext. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
SUPPORT
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Text-Textile-Plaintext
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
Search CPAN
Source code on GitHub
COPYRIGHT & LICENSE
This file and the code within are copyright (c) 2009 by Randy J. Ray.
Copying and distribution are permitted under the terms of the Artistic License 2.0 (http://www.opensource.org/licenses/artistic-license-2.0.php) or the GNU LGPL 2.1 (http://www.opensource.org/licenses/lgpl-2.1.php).
SEE ALSO
Text::Textile::Plaintext, Text::Textile::PostScript, Text::Textile::RTF
AUTHOR
Randy J. Ray <rjray@blackperl.com>