/usr/lib/python2.7/dist-packages/typogrify-2.0.7.egg-info/PKG-INFO is in python-typogrify 1:2.0.7-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 | Metadata-Version: 1.1
Name: typogrify
Version: 2.0.7
Summary: Filters to enhance web typography, including support for Django & Jinja templates
Home-page: https://github.com/mintchaos/typogrify
Author: Christian Metts, Justin Mayer, Chris Drackett
Author-email: chris@tiltshiftstudio.com
License: BSD
Description: Typogrify provides a set of custom filters that automatically apply various
transformations to plain text in order to yield typographically-improved HTML.
While often used in conjunction with Jinja_ and Django_ template systems, the
filters can be used in any environment.
.. _Jinja: http://jinja.pocoo.org/
.. _Django: https://www.djangoproject.com/
Installation
============
The following command will install via ``pip``. Pay particular attention to the
package name::
pip install typogrify
Alternatively, you can run the following command inside the project's root
directory::
python setup.py install
Last but not least, you can simply move the enclosed ``typogrify`` folder
into your Python path.
Requirements
============
Python 2.3 and above is supported, including Python 3. The only dependency is
SmartyPants_, a Python port of a project by John Gruber.
Installing Jinja_ or Django_ is only required if you intend to use the optional
template filters that are included for those frameworks.
.. _SmartyPants: http://web.chad.org/projects/smartypants.py/
Usage
=====
The filters can be used in any environment by importing them from
``typogrify.filters``::
from typogrify.filters import typogrify
content = typogrify(content)
For use with Django, you can add ``typogrify`` to the ``INSTALLED_APPS`` setting
of any Django project in which you wish to use it, and then use
``{% load typogrify_tags %}`` in your templates to load the filters it provides.
Experimental support for Jinja is in ``typogrify.templatetags.jinja_filters``.
Included filters
================
``amp``
-------
Wraps ampersands in HTML with ``<span class="amp">`` so they can be
styled with CSS. Ampersands are also normalized to ``&``. Requires
ampersands to have whitespace or an `` `` on both sides. Will not
change any ampersand which has already been wrapped in this fashion.
``caps``
--------
Wraps multiple capital letters in ``<span class="caps">`` so they can
be styled with CSS.
``initial_quotes``
------------------
Wraps initial quotes in ``<span class="dquo">`` for double quotes or
``<span class="quo">`` for single quotes. Works inside these block
elements:
* ``h1``, ``h2``, ``h3``, ``h4``, ``h5``, ``h6``
* ``p``
* ``li``
* ``dt``
* ``dd``
Also accounts for potential opening inline elements: ``a``, ``em``,
``strong``, ``span``, ``b``, ``i``.
``smartypants``
---------------
Applies ``SmartyPants``.
``typogrify``
-------------
Applies all of the following filters, in order:
* ``amp``
* ``widont``
* ``smartypants``
* ``caps``
* ``initial_quotes``
``widont``
----------
Based on Shaun Inman's PHP utility of the same name, replaces the
space between the last two words in a string with `` `` to avoid
a final line of text with only one word.
Works inside these block elements:
* ``h1``, ``h2``, ``h3``, ``h4``, ``h5``, ``h6``
* ``p``
* ``li``
* ``dt``
* ``dd``
Also accounts for potential closing inline elements: ``a``, ``em``,
``strong``, ``span``, ``b``, ``i``.
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Framework :: Django
Classifier: Framework :: Flask
Classifier: Topic :: Utilities
|