{ "info": { "author": "Florent Gallaire", "author_email": "fgallaire@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 6 - Mature", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: Software Development :: Internationalization", "Topic :: Software Development :: Localization", "Topic :: Text Processing" ], "description": "CJKwrap\n=======\n\n**CJKwrap** is a library for wrapping and filling CJK text.\n\nCJKwrap fix the issue24665 because Python 2 will stay broken forever:\nhttps://bugs.python.org/issue24665.\n\nCJKwrap support **both** Python 2 (2.6 and above) and Python 3 (3.3 and above).\n\nCJKwrap is developed by Florent Gallaire fgallaire@gmail.com.\n\nWebsite: http://fgallaire.github.io/cjkwrap.\n\nDownload and Install\n--------------------\n\nTo install the last stable version from PyPI::\n\n $ sudo pip install cjkwrap\n\nTo install the development version from GitHub::\n\n $ git clone https://github.com/fgallaire/cjkwrap\n $ cd cjkwrap\n $ sudo python setup.py install\n\nOr you can just use the ``cjkwrap.py`` file alone, nothing more needed!\n\nUsage\n-----\n\n``is_wide()`` to know if a char is double-width, ``cjklen()`` and ``cjkslices()`` to replace built-in ``len()`` and slicing::\n\n >>> import cjkwrap\n >>> cjkwrap.is_wide(u\"c\")\n False\n >>> cjkwrap.is_wide(u\"\u9577\")\n True\n >>> cjkwrap.cjklen(u\"\u6700\u7d42\u7684\u306b\u306f\u826f\u3044\u9577\u3055\")\n 18\n >>> head, tail = cjkwrap.cjkslices(u\"\u6700\u7d42\u7684\u306b\u306f\u826f\u3044\u9577\u3055\", 6)\n >>> print(head)\n \u6700\u7d42\u7684\n >>> print(tail)\n \u306b\u306f\u826f\u3044\u9577\u3055\n\nAs ``cjklen()`` uses ``len()`` for non unicode stuff, you can safely do this::\n\n >>> from cjkwrap import cjklen as len\n >>> len(u\"\u6700\u7d42\u7684\u306b\u306f\u826f\u3044\u9577\u3055\")\n 18\n >>> len([1, 2, 3, 4])\n 4\n\n``wrap()`` and ``fill()`` to replace the ones from the Python standard library::\n\n >>> wrapped_cjk = cjkwrap.wrap(u\"\u6700\u7d42\u7684\u306b\u826f\u3044\u30e9\u30c3\u30d4\u30f3\u30b0\", 10)\n >>> for line in wrapped_cjk: print(line)\n ... \n \u6700\u7d42\u7684\u306b\u826f\n \u3044\u30e9\u30c3\u30d4\u30f3\n \u30b0\n >>> print(cjkwrap.fill(u\"\u6700\u7d42\u7684\u306b\u826f\u3044\u30e9\u30c3\u30d4\u30f3\u30b0\", 10))\n \u6700\u7d42\u7684\u306b\u826f\n \u3044\u30e9\u30c3\u30d4\u30f3\n \u30b0\n\nMixed content is allowed::\n\n >>> cjkwrap.cjklen(u\"CJK \u6700\u7d42\u7684\u306b\u306f\u826f\u3044\u9577\u3055\")\n 22\n >>> print(cjkwrap.fill(u\"CJK \u6700\u7d42\u7684\u306b\u306f\u826f\u3044\u9577\u3055\", 10))\n CJK \u6700\u7d42\u7684\n \u306b\u306f\u826f\u3044\u9577\n \u3055\n\nLicense\n-------\n\nCJKwrap files are released under the GNU LGPLv3 or above license.\n\nCJKwrap codebase from textwrap by Greg Ward (gward@python.net) under the Python license.\n", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://fgallaire.github.io/cjkwrap", "keywords": "cjk wrap", "license": "GNU LGPLv3+", "maintainer": null, "maintainer_email": null, "name": "CJKwrap", "package_url": "https://pypi.org/project/CJKwrap/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/CJKwrap/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://fgallaire.github.io/cjkwrap" }, "release_url": "https://pypi.org/project/CJKwrap/2.2/", "requires_dist": null, "requires_python": null, "summary": "CJKwrap is a library for wrapping and filling CJK text. Fix Python issue24665", "version": "2.2" }, "last_serial": 2540421, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "dd73005debe2d6be94671f12f906ca9f", "sha256": "d4f029425c99d6c22f3164dcf35eb0fb6763c6eede5b810f47ba842c1ebe18f0" }, "downloads": -1, "filename": "CJKwrap-1.0-py2-none-any.whl", "has_sig": false, "md5_digest": "dd73005debe2d6be94671f12f906ca9f", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 4170, "upload_time": "2016-09-05T00:17:28", "url": "https://files.pythonhosted.org/packages/25/76/55b1659a16aa72f87d33dd13f62ef6bc21c9b88257d6e1bf99bbac3c25dc/CJKwrap-1.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5f8d7ce58efd1e664489589a39f7015c", "sha256": "8d2f9266f97696edb0a50efbea7bbca7df846bacae29e8eb2c77dcb051999ef7" }, "downloads": -1, "filename": "CJKwrap-1.0.tar.gz", "has_sig": false, "md5_digest": "5f8d7ce58efd1e664489589a39f7015c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3443, "upload_time": "2016-09-05T00:17:25", "url": "https://files.pythonhosted.org/packages/36/98/de93f5d263a85eb4369ba9449b7899a0e046dbc060c8d2205d687c369cc1/CJKwrap-1.0.tar.gz" } ], "2.0": [ { "comment_text": "", "digests": { "md5": "2484b2302d18377d41ffc38ae00f5fe8", "sha256": "9ca4faa9470231136b8ce6adbb043fd9834dfee596c6f6e20cf6946b8324e45f" }, "downloads": -1, "filename": "CJKwrap-2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "2484b2302d18377d41ffc38ae00f5fe8", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 4233, "upload_time": "2016-09-05T23:52:59", "url": "https://files.pythonhosted.org/packages/41/ec/cda0370d9ba3404e5399000a83a0b0593caab3b39e07a92af345d9354e29/CJKwrap-2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "35a3295ebd489d05bb7d6fa2207e30b7", "sha256": "3f99aa48305be8701c98d58a440b10372503b9d7bb1ab9a389dc5da5657a7647" }, "downloads": -1, "filename": "CJKwrap-2.0.tar.gz", "has_sig": false, "md5_digest": "35a3295ebd489d05bb7d6fa2207e30b7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21309, "upload_time": "2016-09-05T23:52:57", "url": "https://files.pythonhosted.org/packages/f5/79/9b28ab5c849aacbe60b935c685fc4ec8363f59c1950fb6f8ab727e25e1c3/CJKwrap-2.0.tar.gz" } ], "2.1": [ { "comment_text": "", "digests": { "md5": "db6978d919bb3728c5f9ae23bc0c9e28", "sha256": "4e398dfe8e5d123f5c5dc1d6c20d70fc2aa512cd65d02fd0afb4f8efd7d29306" }, "downloads": -1, "filename": "CJKwrap-2.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "db6978d919bb3728c5f9ae23bc0c9e28", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 4312, "upload_time": "2016-12-27T05:23:33", "url": "https://files.pythonhosted.org/packages/51/13/43c336399b955ff76df0d9edb88762441f35910a56adff9adefa2db0c9b0/CJKwrap-2.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f228ec82a27d8932807226898c7642df", "sha256": "b3a53cc3ad4d1eb46164beb18baa0363317826cd382fcf147b491c16d7cee7a4" }, "downloads": -1, "filename": "CJKwrap-2.1.tar.gz", "has_sig": false, "md5_digest": "f228ec82a27d8932807226898c7642df", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21396, "upload_time": "2016-12-27T05:23:31", "url": "https://files.pythonhosted.org/packages/e6/b1/e51f135ac1598a5a95593161c4c52359e9be08fe87b8566a4c06530f573c/CJKwrap-2.1.tar.gz" } ], "2.2": [ { "comment_text": "", "digests": { "md5": "ff968b9de740c6319b9668769bfbbda7", "sha256": "b756d0aaf5a3e765eefb7e6f9e5d47335e7d593fecfb201cdeb3c0f05ff47f0e" }, "downloads": -1, "filename": "CJKwrap-2.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ff968b9de740c6319b9668769bfbbda7", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 4294, "upload_time": "2016-12-27T06:19:51", "url": "https://files.pythonhosted.org/packages/70/a8/311665d8fd10f167b492b5363715c5bc262de0c39879a1ffba710f1a42ff/CJKwrap-2.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b1300ddfae18a7604aa039c1510bb82d", "sha256": "a2c7d2e527a0e89865ac2e6e73f198b829b871c826f34eeb4efb09669e1ec0ac" }, "downloads": -1, "filename": "CJKwrap-2.2.tar.gz", "has_sig": false, "md5_digest": "b1300ddfae18a7604aa039c1510bb82d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21387, "upload_time": "2016-12-27T06:19:48", "url": "https://files.pythonhosted.org/packages/43/e7/6289123edb86eef09d43ece0648c2eb71d860f020ae17b2c7a52ffa8bbe9/CJKwrap-2.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ff968b9de740c6319b9668769bfbbda7", "sha256": "b756d0aaf5a3e765eefb7e6f9e5d47335e7d593fecfb201cdeb3c0f05ff47f0e" }, "downloads": -1, "filename": "CJKwrap-2.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ff968b9de740c6319b9668769bfbbda7", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 4294, "upload_time": "2016-12-27T06:19:51", "url": "https://files.pythonhosted.org/packages/70/a8/311665d8fd10f167b492b5363715c5bc262de0c39879a1ffba710f1a42ff/CJKwrap-2.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b1300ddfae18a7604aa039c1510bb82d", "sha256": "a2c7d2e527a0e89865ac2e6e73f198b829b871c826f34eeb4efb09669e1ec0ac" }, "downloads": -1, "filename": "CJKwrap-2.2.tar.gz", "has_sig": false, "md5_digest": "b1300ddfae18a7604aa039c1510bb82d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21387, "upload_time": "2016-12-27T06:19:48", "url": "https://files.pythonhosted.org/packages/43/e7/6289123edb86eef09d43ece0648c2eb71d860f020ae17b2c7a52ffa8bbe9/CJKwrap-2.2.tar.gz" } ] }