{ "info": { "author": "Clemens Radl", "author_email": "clemens.radl@googlemail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.6", "Topic :: Text Processing :: Markup" ], "description": "***********\r\nsimplestyle\r\n***********\r\n\r\nThis package was originally part of a Python tool to extract text data\r\nfrom PDFs into TEI XML. Some of the style information that was extracted\r\nfrom the PDF had to be recorded in the resulting TEI file. Among these\r\nwere fontname, fontsize, italics, boldface, superscript, subscript.\r\nThese were included as simple CSS statements into the ``tagsDecl`` of\r\nthe TEI document.\r\n\r\nLater it seemed approporiate to remove this very simple style library\r\nfrom the PDF extraction package and offer it as a little standalone\r\npackage, which can be useful in different contexts.\r\n\r\nNB: This package might be useful for some people, hence it is published\r\nas an open source package, but it is still very much tailored to some\r\nvery special needs for text processing. It is not very likely that this\r\npackage will be developed into a general CSS library. If you need this,\r\nyou will find plenty of helpful libraries on PyPI.\r\n\r\nDownload, Installation\r\n======================\r\n\r\nsimplestyle is available on PyPI\r\n.\r\n\r\nInstall with ``pip install simplestyle``.\r\n\r\nThe source code is on GitHub: .\r\n\r\nSimplified CSS\r\n==============\r\n\r\nThe simplified CSS grammar understood by this package is as follows::\r\n\r\n css := declaration (\";\" declaration)* ';'?\r\n declaration := property \":\" expr\r\n property := [a-zA-Z-]+\r\n expr := (string | [^;\"']+)\r\n string := string1 | string2\r\n string1 := \"'\" [^'\\n\\r\\f] \"'\"\r\n string2 := '\"' [^\"\\n\\r\\f] '\"'\r\n\r\nUsage\r\n=====\r\n\r\n.. code:: pycon\r\n\r\n >>> from simplestyle import Style\r\n >>> css = \"font-size: 10pt\"\r\n >>> style = Style()\r\n >>> style.from_css(css)\r\n >>> style.size\r\n 10.0\r\n >>> style.get_css()\r\n 'font-size: 10.0pt'\r\n >>> style.italics\r\n False\r\n >>> style.from_css(\"font-style:italic\", merge=True)\r\n >>> style.italics\r\n True\r\n >>> style.size\r\n 10.0\r\n >>> style.get_css()\r\n 'font-size: 10.0pt; font-style: italic'\r\n >>> style.reset()\r\n >>> style.get_css()\r\n ''\r\n\r\n\r\n\r\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/rotula/simplestyle", "keywords": "CSS styles stylesheets", "license": "MIT", "maintainer": "Clemens Radl", "maintainer_email": "clemens.radl@googlemail.com", "name": "simplestyle", "package_url": "https://pypi.org/project/simplestyle/", "platform": "", "project_url": "https://pypi.org/project/simplestyle/", "project_urls": { "Homepage": "https://github.com/rotula/simplestyle" }, "release_url": "https://pypi.org/project/simplestyle/1.0.1/", "requires_dist": null, "requires_python": "", "summary": "Handling of simple stylesheets (subset of CSS)", "version": "1.0.1" }, "last_serial": 3831799, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "4ce8c75a4f05c6ca81d27475b51f2af2", "sha256": "0862ab0efe4ea325b424ebbc08bb212b918764d3319cc427926ddec12c3d1149" }, "downloads": -1, "filename": "simplestyle-1.0.0-py2-none-any.whl", "has_sig": false, "md5_digest": "4ce8c75a4f05c6ca81d27475b51f2af2", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 7228, "upload_time": "2017-04-06T08:25:11", "url": "https://files.pythonhosted.org/packages/74/28/66a0981c4b2b4169fd37e0467cd1fb90ae37a40d389ff4576f55a4ac2784/simplestyle-1.0.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "76013d19a33983064c77b96a8dfe099a", "sha256": "31d9bbae7737b5f0ab94a3fd992be522ef14ab6884268ca56439cd5262091c56" }, "downloads": -1, "filename": "simplestyle-1.0.0.zip", "has_sig": false, "md5_digest": "76013d19a33983064c77b96a8dfe099a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10021, "upload_time": "2017-04-06T08:25:15", "url": "https://files.pythonhosted.org/packages/65/43/6d4cb44efb69bc114ac0e57b6f075d4c61cf6795e2fc18bf24fdf0c9f1d1/simplestyle-1.0.0.zip" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "e9a67da66aa701f3f8a3dbd65a1e1e5f", "sha256": "0b9b924aacfd9f1770aea5ba32a0dce455ad1b47c37da43229e159733a5b6cdd" }, "downloads": -1, "filename": "simplestyle-1.0.1-py2-none-any.whl", "has_sig": false, "md5_digest": "e9a67da66aa701f3f8a3dbd65a1e1e5f", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 5464, "upload_time": "2018-05-03T17:53:47", "url": "https://files.pythonhosted.org/packages/58/a4/1af93f09b953f7930c0121a6441133214315df08c2365280bdd7ef94a26c/simplestyle-1.0.1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c02451a2ab8c15fa5917baa09f41f220", "sha256": "30c6384fe8742946c097efbf9eca984a474a9c098794122655801512301df6a7" }, "downloads": -1, "filename": "simplestyle-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "c02451a2ab8c15fa5917baa09f41f220", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5422, "upload_time": "2018-05-03T17:53:48", "url": "https://files.pythonhosted.org/packages/1c/1d/8dfc9b084a398198da345eabd002911ca5884f547486489fa62621ee28b4/simplestyle-1.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "de32d7c917b185030a1d3a9a2a42745e", "sha256": "7884aada5572dba2fb25615c9d55ed5c6be1195a65306a6d3b548db565186061" }, "downloads": -1, "filename": "simplestyle-1.0.1.tar.gz", "has_sig": false, "md5_digest": "de32d7c917b185030a1d3a9a2a42745e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5691, "upload_time": "2018-05-03T17:53:49", "url": "https://files.pythonhosted.org/packages/4c/3a/75efb09aa4cf9cb0156d990196e380d44fa7a091dbe26d72065e727abc06/simplestyle-1.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e9a67da66aa701f3f8a3dbd65a1e1e5f", "sha256": "0b9b924aacfd9f1770aea5ba32a0dce455ad1b47c37da43229e159733a5b6cdd" }, "downloads": -1, "filename": "simplestyle-1.0.1-py2-none-any.whl", "has_sig": false, "md5_digest": "e9a67da66aa701f3f8a3dbd65a1e1e5f", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 5464, "upload_time": "2018-05-03T17:53:47", "url": "https://files.pythonhosted.org/packages/58/a4/1af93f09b953f7930c0121a6441133214315df08c2365280bdd7ef94a26c/simplestyle-1.0.1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c02451a2ab8c15fa5917baa09f41f220", "sha256": "30c6384fe8742946c097efbf9eca984a474a9c098794122655801512301df6a7" }, "downloads": -1, "filename": "simplestyle-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "c02451a2ab8c15fa5917baa09f41f220", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5422, "upload_time": "2018-05-03T17:53:48", "url": "https://files.pythonhosted.org/packages/1c/1d/8dfc9b084a398198da345eabd002911ca5884f547486489fa62621ee28b4/simplestyle-1.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "de32d7c917b185030a1d3a9a2a42745e", "sha256": "7884aada5572dba2fb25615c9d55ed5c6be1195a65306a6d3b548db565186061" }, "downloads": -1, "filename": "simplestyle-1.0.1.tar.gz", "has_sig": false, "md5_digest": "de32d7c917b185030a1d3a9a2a42745e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5691, "upload_time": "2018-05-03T17:53:49", "url": "https://files.pythonhosted.org/packages/4c/3a/75efb09aa4cf9cb0156d990196e380d44fa7a091dbe26d72065e727abc06/simplestyle-1.0.1.tar.gz" } ] }