{ "info": { "author": "Roman Miroshnychenko", "author_email": "roman1972@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 3", "Topic :: Text Processing :: Linguistic" ], "description": "Python XLIFF Converter\n######################\n\nThis package provides a set of utilities for converting rich-text markup files\nto `OASIS XLIFF`_ translatable format. Currently only HTML <=> XLIFF 1.2 conversion\nis supported.\n\nInstallation\n============\n\nPython XLIFF Converter can be installed using pip::\n\n pip install py-xliff-converter\n\nUsage\n=====\n\nHTML => XLIFF\n-------------\n\nCommand line::\n\n html2xliff .html\n\nThis command will create ``.xlf`` file that can be translated using most\ncommon online and offline CAT tools: Trados, memoQ, Transifex etc.\n\nAPI:\n\n.. code-block:: python\n\n from xliff_converter.html_parser import convert_html\n ...\n with open(html_filename, 'r', encoding='utf-8') as fo:\n html = fo.read()\n xliff = convert_html(html, html_filename)\n ...\n\nThe ``convert_html(...)`` function returns translatable XLIFF document as ``bytes``\nstring encoded in UTF-8.\n\nXLIFF => HTML\n-------------\n\nCommand line::\n\n xliff2html .xlf\n\nThis command will create ``_.html`` file containing translated\ncontent of the source HTML file. ```` is the language code of a target\nlanguage.\n\nAPI:\n\n.. code-block:: python\n\n from xliff_converter.html_rebuilder import rebuild_html\n ...\n with open(xliff_filename, 'r', encoding='utf-8') as fo:\n xliff = fo.read()\n filename, html = rebuild_html(xliff)\n\nThe ``rebuild_html(...)`` function returns a tuple (named tuple) containing\nthe name of a translated HTML file and its contents as ``str``.\n\nNotes\n=====\n\n- Currently Python XLIFF Converter supports only English as a source language.\n- Translatable text is segmented by sentences using `NLTK`_ sentence tokenizer.\n- The HTML converter accepts partial HTML markup, e.g. ```` tag\n contents and even plain text.\n- ``
`` tags are treated as translation segment delimiters.\n- ``
...
`` blocks are ignored.\n\nTo do\n=====\n\n- More file formats.\n- XLIFF 2.0 support.\n\n.. _OASIS XLIFF: https://en.wikipedia.org/wiki/XLIFF\n.. _NLTK: https://www.nltk.org\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/romanvm/py-xliff-converter", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "py-xliff-converter", "package_url": "https://pypi.org/project/py-xliff-converter/", "platform": "", "project_url": "https://pypi.org/project/py-xliff-converter/", "project_urls": { "Homepage": "https://github.com/romanvm/py-xliff-converter" }, "release_url": "https://pypi.org/project/py-xliff-converter/0.0.1/", "requires_dist": null, "requires_python": "", "summary": "Utilities for converting rich text markup files to XLIFF format", "version": "0.0.1" }, "last_serial": 4215815, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "ad57bfd4dc4d7ce943fc776b82e85747", "sha256": "deb46a207f9c69bfae32c7aaaddbdc5798e334fd4c7151a759283d843ceda514" }, "downloads": -1, "filename": "py-xliff-converter-0.0.1.tar.gz", "has_sig": false, "md5_digest": "ad57bfd4dc4d7ce943fc776b82e85747", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8303, "upload_time": "2018-08-28T16:43:16", "url": "https://files.pythonhosted.org/packages/47/a3/11d1f99446fc9b6f3f4c9bc43bb6bde7aad414cd532259408ca53ad7b622/py-xliff-converter-0.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ad57bfd4dc4d7ce943fc776b82e85747", "sha256": "deb46a207f9c69bfae32c7aaaddbdc5798e334fd4c7151a759283d843ceda514" }, "downloads": -1, "filename": "py-xliff-converter-0.0.1.tar.gz", "has_sig": false, "md5_digest": "ad57bfd4dc4d7ce943fc776b82e85747", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8303, "upload_time": "2018-08-28T16:43:16", "url": "https://files.pythonhosted.org/packages/47/a3/11d1f99446fc9b6f3f4c9bc43bb6bde7aad414cd532259408ca53ad7b622/py-xliff-converter-0.0.1.tar.gz" } ] }