Text::Amuse::Preprocessor::Typography - Perl extension for pre-processing of Text::Amuse files [DEPRECATED]
use Text::Amuse::Preprocessor::Typography qw/typography_filter/; my $cleanedtext = typography_filter($lang, $text)
Common routines to filter the input files, fixing typography and language-specific rules. All the text is assumed to be already decoded.
This module is DEPRECATED and kept only for legacy. Please use the interface described in Text::Amuse::Preprocessor instead.
Detect and replace the bare links with the proper markup, as [[http://domain.org/my/url/and_params?a=1&b=c][domain.org]]
It's a bit opinionated to hide the full url and show only the domain. Anyway, it's a preprocessing filter and the most important thing is not to loose pieces. And we don't, because the full url is still there. Anyway, long urls are a pain to display and to typeset, so the domain is a sensible choise. The user can anyway change this. It's just an helper to avoid boring tasks, nothing more.
Returns the adjusted string.
Perform the smart replacement of single quotes, double quotes, dashes and, in some cases, the superscript for things like 2nd, 13th, etc.
The languages supported are en, fi, hr, sr, ru, es.
en
fi
hr
sr
ru
es
Return a sub which you can call later on a string. The sub will first call the common replacements (ugly unicode ligatures). If the first argument is set and is a valid language, will do the language specific replacements. If the second argument is set and true, will also fix the links.
The sub itself will return the adjusted string.
Return an hashref with the filters subs.
Text::Amuse::Preprocessor
To install Text::Amuse::Preprocessor, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Text::Amuse::Preprocessor
CPAN shell
perl -MCPAN -e shell install Text::Amuse::Preprocessor
For more information on module installation, please visit the detailed CPAN module installation guide.