NAME

Text::Amuse::Preprocessor::Typography - Perl extension for pre-processing of Text::Amuse files

SYNOPSIS

use Text::Amuse::Preprocessor::Typography qw/typography_filter/;
my $cleanedtext = typography_filter($lang, $text)

DESCRIPTION

Common routines to filter the input files, fixing typography and language-specific rules. All the text is assumed to be already decoded.

FUNCTIONS

linkify_filter($string)

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.

typography_filter($lang, $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.

Returns the adjusted string.

SEE ALSO

Text::Muse Text::Muse::Formats Text::Muse::EPUB

The Muse homepage: http://mwolson.org/projects/EmacsMuse.html

The Anarchist Library project: http://theanarchistlibrary.org

AUTHOR

Marco Pessotto, marco@theanarchistlibrary.org

LICENSE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.1 or, at your option, any later version of Perl 5 you may have available.