{ "info": { "author": "Honza Javorek", "author_email": "mail@honzajavorek.cz", "bugtrack_url": null, "classifiers": [], "description": "Tipi\r\n====\r\n\r\nTipi is for typographic replacements in HTML.\r\n\r\nStatus: ACTIVE\r\n--------------\r\n\r\nUnder active development and maintenance.\r\n\r\n.. image:: https://travis-ci.org/honzajavorek/tipi.png?branch=master\r\n :target: https://travis-ci.org/honzajavorek/tipi\r\n.. image:: https://coveralls.io/repos/honzajavorek/tipi/badge.png?branch=master\r\n :target: https://coveralls.io/r/honzajavorek/tipi?branch=master\r\n.. image:: https://pypip.in/v/tipi/badge.png\r\n :target: http://pypi.python.org/pypi/tipi/\r\n.. image:: https://pypip.in/d/tipi/badge.png\r\n :target: http://pypi.python.org/pypi/tipi/\r\n\r\nIdeas behind this project\r\n-------------------------\r\n\r\n- Input is HTML code, output is the same HTML code with changes in typography (entities, spaces, quotes, etc.).\r\n- `You can't parse HTML with regex. `_\r\n- The best existing HTML parser and *tokenizer* for Python is `lxml `_.\r\n- There are more languages than English in the world. Each of them has different typographic rules.\r\n\r\nInstallation\r\n------------\r\n\r\nEasy::\r\n\r\n $ pip install tipi\r\n\r\nQuickstart\r\n----------\r\n\r\nUsage of tipi is very straightforward:\r\n\r\n.. code-block:: python\r\n\r\n >>> from tipi import tipi\r\n >>> html = '

\"Zavolej mi na \u010d\u00edslo 765-876-888,\" \u0159ekla, a zmizela...

'\r\n >>> html = tipi(html, lang='cs')\r\n >>> html\r\n '

\\u201eZavolej mi na \\u010d\\xed\\xadslo 765\\u2013876\\u2013888,\\u201c \\u0159ekla, a\\xa0zmizela\\u2026

'\r\n >>> print html\r\n

\u201eZavolej mi na \u010d\u00ed\u00adslo 765\u2013876\u2013888,\u201c \u0159ekla, a\u00a0zmizela\u2026

\r\n\r\nRemember that tipi is designed to work with HTML. In case you need to perform replacements on plaintext, escape it first:\r\n\r\n.. code-block:: python\r\n\r\n >>> fron tipi import tipi\r\n >>> tipi('b -> c') # this works only by coincidence!\r\n u'b \u2192 c'\r\n >>> tipi('a <- b -> c')\r\n u'a c'\r\n >>> import cgi\r\n >>> html = cgi.escape(u'a <- b -> c')\r\n >>> html\r\n u'a <- b -> c'\r\n >>> tipi(html)\r\n u'a \u2190 b \u2192 c'\r\n\r\nFeatures\r\n--------\r\n\r\n- Support for multiple languages.\r\n- Language-sensitive replacements for single quotes and double quotes.\r\n- Ellipsis, dashes, nonbreakable spaces, ...\r\n- Arrows (--> turned into \u2192 ), dimensions (12 \u00d7 30).\r\n- Symbols (trademark, registered, copyright, EUR, ...)\r\n\r\nAlternatives\r\n------------\r\n\r\n- `Typogrify `_ - English only, adds markup for styling, on top of `smartypants `_\r\n- `cstypo `_ - Czech only, not working well with HTML\r\n\r\nPlans\r\n-----\r\n\r\n- Inspiration from `Typogrify `_?\r\n- Get some inspiration from `Dero's `_ and `Typomil's `_ typography guides.\r\n- Get some inspiration from `Liteera.cz `_) (`source `_).\r\n- Maybe also some inspiration `from here `_.\r\n\r\nLicense: MIT\r\n------------\r\n\r\n\u00a9 2013-2014 Jan Javorek \r\n\r\nThis work is licensed under `MIT license `_.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/honzajavorek/tipi", "keywords": "", "license": "The MIT License (MIT)\r\n\r\nCopyright (c) 2013-2014 Honza Javorek\r\n\r\nPermission is hereby granted, free of charge, to any person obtaining a copy of\r\nthis software and associated documentation files (the \"Software\"), to deal in\r\nthe Software without restriction, including without limitation the rights to\r\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\r\nthe Software, and to permit persons to whom the Software is furnished to do so,\r\nsubject to the following conditions:\r\n\r\nThe above copyright notice and this permission notice shall be included in all\r\ncopies or substantial portions of the Software.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\r\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\r\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\r\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\r\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.", "maintainer": "", "maintainer_email": "", "name": "tipi", "package_url": "https://pypi.org/project/tipi/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/tipi/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/honzajavorek/tipi" }, "release_url": "https://pypi.org/project/tipi/0.0.4/", "requires_dist": null, "requires_python": null, "summary": "Typographic replacements in HTML", "version": "0.0.4" }, "last_serial": 1101787, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "0a2b3deddc84bd22ab597879d08594aa", "sha256": "bd0a72f3c531d6382af01bb29c853f5821db8199cb2ef3006c14e023bfb68630" }, "downloads": -1, "filename": "tipi-0.0.1.tar.gz", "has_sig": false, "md5_digest": "0a2b3deddc84bd22ab597879d08594aa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9809, "upload_time": "2014-04-30T20:35:09", "url": "https://files.pythonhosted.org/packages/3c/bc/f11818e1b1227ca15becb0133eeb1b42143157cf299db4f74635effac137/tipi-0.0.1.tar.gz" } ], "0.0.1dev": [ { "comment_text": "", "digests": { "md5": "363307fe61faacd683d3a68cde4c0c88", "sha256": "b9c85b7a3911d7a527328548fe0624a184204b2aa36c0e56c4d68e8514004f9f" }, "downloads": -1, "filename": "tipi-0.0.1dev.tar.gz", "has_sig": false, "md5_digest": "363307fe61faacd683d3a68cde4c0c88", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8275, "upload_time": "2013-10-08T14:07:49", "url": "https://files.pythonhosted.org/packages/b0/d3/560eab346304cfd6834d3e1124ac1e17c2209df6705eb33eaaa5e44fec3a/tipi-0.0.1dev.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "a3c4e1ceba1599687bd5c47ec1cf58ec", "sha256": "389c285ad0f7c29839ebbcfeb354fda3b27b9c3628a2e843a31eb1d395a17e98" }, "downloads": -1, "filename": "tipi-0.0.2.tar.gz", "has_sig": false, "md5_digest": "a3c4e1ceba1599687bd5c47ec1cf58ec", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9838, "upload_time": "2014-04-30T20:42:10", "url": "https://files.pythonhosted.org/packages/83/c1/b9a5f85aa1e423523557db143d33af3e95a597eb07b3673eff2118531b87/tipi-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "1728c8d43ab7e9c38434ea8faea66959", "sha256": "7c6c5fb7b0fdb495a74ce594a39d12e0f59f83330d5547cfe147484277069105" }, "downloads": -1, "filename": "tipi-0.0.3.tar.gz", "has_sig": false, "md5_digest": "1728c8d43ab7e9c38434ea8faea66959", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10150, "upload_time": "2014-05-03T16:29:44", "url": "https://files.pythonhosted.org/packages/74/75/33612c3f69c6bd0d25a14589131c62728b74e97969c4c6be42fc090a2d5b/tipi-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "618c6a534c83ace98a5c07d50b5a23af", "sha256": "a80a38ad7f8e18321e0456b40a24a82db64d338f7ed2100d10637892ba63cb03" }, "downloads": -1, "filename": "tipi-0.0.4.tar.gz", "has_sig": false, "md5_digest": "618c6a534c83ace98a5c07d50b5a23af", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12517, "upload_time": "2014-05-23T07:51:29", "url": "https://files.pythonhosted.org/packages/53/f2/2e53b18ef06d890f8fdab4bce4ca29c921022e37cd34a45e80fe07b8b14b/tipi-0.0.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "618c6a534c83ace98a5c07d50b5a23af", "sha256": "a80a38ad7f8e18321e0456b40a24a82db64d338f7ed2100d10637892ba63cb03" }, "downloads": -1, "filename": "tipi-0.0.4.tar.gz", "has_sig": false, "md5_digest": "618c6a534c83ace98a5c07d50b5a23af", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12517, "upload_time": "2014-05-23T07:51:29", "url": "https://files.pythonhosted.org/packages/53/f2/2e53b18ef06d890f8fdab4bce4ca29c921022e37cd34a45e80fe07b8b14b/tipi-0.0.4.tar.gz" } ] }