textile2x - Convert Textile markup from the command-line
# Each of these does the exact same thing textile2x --input README.textile --output README textile2x < README.textile > README textile2x --convert README.textile=README
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:
Text-Textile-Plaintext
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.
The following options are recognized by textile2x:
Specifies the default format for conversions. The default conversion format is plaintext. The allowable values are:
plaintext
The argument to --format is not case-sensitive.
--format
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.
--convert
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.
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:
=
Output will be plaintext.
Output will be postscript.
postscript
Output will be rtf (Rich-Text Format).
rtf
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 to plaintext) is used.
Displays a short help-message with a summary of the options.
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.
bug-text-textile-plaintext at rt.cpan.org
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Text-Textile-Plaintext
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Text-Textile-Plaintext
CPAN Ratings
http://cpanratings.perl.org/d/Text-Textile-Plaintext
Search CPAN
http://search.cpan.org/dist/Text-Textile-Plaintext
Source code on GitHub
http://github.com/rjray/text-textile-plaintext/tree/master
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).
Text::Textile::Plaintext, Text::Textile::PostScript, Text::Textile::RTF
Randy J. Ray <rjray@blackperl.com>
<rjray@blackperl.com>
To install Text::Textile::Plaintext, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Text::Textile::Plaintext
CPAN shell
perl -MCPAN -e shell install Text::Textile::Plaintext
For more information on module installation, please visit the detailed CPAN module installation guide.