Metadata-Version: 1.1
Name: cstypo
Version: 0.1.2
Summary: Package to apply Czech typography easily
Home-page: https://github.com/yetty/cstypo
Author: Juda Kaleta
Author-email: juda.kaleta@gmail.com
License: MIT License
-----------

Copyright (c) 2012 Juda Kaleta (http://www.judakaleta.cz)
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.



Description: cstypo
        ======
        
        Balíček pro zkrášlení českých textů aplikováním základních typografických
        pravidel. Nesnaží se o pokrytí veškerých českých pravidel, spíše o aplikaci
        základních a to hlavně těch, které jsou na webu nejvíce vidět.
        
        Instalace
        ---------
        
            pip install cstypo
        
        
        
        API
        -------
        
        *   `cstypo.parser.TxtParser`
        
            Výchozí třída pro zpracování textu. Použití:
        
                parser = cstypo.parser.TxtParser(text)
                print parser.parser()       # zformátovaný text
        
            Je možné využít samostatně jednotlivé metody aplikující určitá pravidla:
        
            * `cstypo.parser.TxtParser.parse_ellipsis`
            * `cstypo.parser.TxtParser.parse_en_dash`
            * `cstypo.parser.TxtParser.parse_em_dash`
            * `cstypo.parser.TxtParser.parse_dates`
            * `cstypo.parser.TxtParser.parse_arrows`
            * `cstypo.parser.TxtParser.parse_plusminus`
            * `cstypo.parser.TxtParser.parse_dimension`
            * `cstypo.parser.TxtParser.parse_quotes`
            * `cstypo.parser.TxtParser.parse_prepositions`
            * `cstypo.parser.TxtParser.parse_last_short_word`
        
        
        *   `cstypo.parser.HtmlParser`
        
            Potomek třídy `TxtParser`, který nejdříve escapuje veškeré HTML tagy,
            aplikuje typografická pravidla na získaný text a vratí tagy zpět.
        
        
        Django
        -------
        
        Pro použití ve frameworku Django je připraven filtr typify v souboru `cstags`.
        
        Nejdříve je potřeba `cstypo` přidat do `INSTALLED_APPS`
        
            INSTALLED_APPS = (
                ...
                'cstypo',
            )
        
        Poté je možné začít v šablonách používat filtr.
        
            {% load cstags %}
        
            {{ text|typify }}                # zpracování obyčejného textu (výchozí)
            {{ text|typify:'txt' }}          # ...
        
            {{ text|typify:'html' }}         # zpracování html
            {{ text|typify:'html'|safe }}    # pro povolení vypsání je potřeba filter safe
        
        
        
        CLI
        ----
        
            cstypo
        
            Usage:
                cstypo [--type (txt|html)] <input>
                cstypo -h | --help
                cstypo -v | --version
        
            Options:
                -h --help               show this screen.
                -v --version            show version.
                --type                  type of parsed file (txt default).
        
        
Platform: UNKNOWN
Requires: docopt (>=0.5.0)
