{ "info": { "author": "Jack Jennings", "author_email": "j@ckjennin.gs", "bugtrack_url": null, "classifiers": [], "description": "Sm\u00f6rg\u00e5sbord\n===========\n\n.. image:: https://travis-ci.org/jackjennings/smorgasbord.svg?branch=master\n :target: https://travis-ci.org/jackjennings/smorgasbord\n\nSm\u00f6rg\u00e5sbord tests coverage over unicode character sets.\n\nThe ``Smorgasbord`` class inherits from ``UnicodeSet`` and supports `the same features `_.\n\nSupports Python 2.6 \u2013 3.x\n\n.. code-block:: bash\n\n $ pip install smorgasbord\n\n.. code-block:: python\n\n from smorgasbord import Smorgasbord\n\n # Provide a path to a file or folder of character sets\n Smorgasbord.paths.prepend(\"/my/path/to/language/en.txt\")\n\n >>> bord = Smorgasbord([97, \"b\", \"c\", u\"\u00fc\", u\"\\u0660\"])\n Smorgasbord([u\"a\", u\"c\", u\"b\", u\"\\xfc\", u\"\\u0660\"])\n\n # Reports are accessed though the \"reports\" dict using the language code\n >>> en = bord.reports[\"en\"]\n \n # Basic information about the report's language is accessible\n >>> en.language.code\n \"en\"\n >>> en.language.name\n \"English\"\n >>> en.language.characters\n FrozenUnicodeSet([u\"a\", u\"b\", u\"c\", ...])\n \n # Amount of coverage is availbe as float and string representations\n >>> en.coverage\n 0.057\n >>> en.coverage.percentage\n u\"5.7%\"\n \n # Sets of glyphs can be accessed\n >>> en.covered\n FrozenUnicodeSet([u\"a\", u\"b\", u\"c\"])\n >>> en.uncovered\n FrozenUnicodeSet([u\"d\", u\"e\", u\"f\", ...])\n \n # Reports can also return a boolean value for completeness:\n >>> en.complete\n False\n >>> en.incomplete\n True\n\nCharacter Set Files\n-------------------\n\nEach character set is defined in a text file. Characters are separated by spaces, and lines starting with a ``#`` are ignored as comments. Line breaks can and should be used to wrap lines to 80 characters maximum.\n\nFor example, an ``en.txt`` definition for an English coverage character set:\n\n.. code-block:: python\n\n # Language: English\n a b c d e f g h i j k l m n o p q r s t u v w x y z\n A B C D E F G H I J K L M N O P Q R S T U V W X Y Z\n\nThe first line is a special comment that will be parsed as the language name. Other special comments may be added in the future, but for now only ``Language`` is supported.\n\nSupplying Character Sets\n------------------------\n\nCharacter sets are made available by supplying a path to a folder, or directly to a language file.\n\n.. code-block:: python\n\n Smorgasbord.paths.prepend(\"/my/path/to/language/files/dir\")\n Smorgasbord.paths.prepend(\"/my/path/to/language/file.txt\")\n\nCharacter set files are searched for in each succesive folder, using the first matching file.\n\nAlternatively, the ``paths`` array can be replaced entirely:\n\n.. code-block:: python\n\n Smorgasbord.paths = [\"/my/path/to/language/files/dir\"]\n\nRoadmap\n-------\n\nThis is a quick list of features that will need to be added in the near future (and will probably comprise a 1.0 release).\n\n* Lazily evaluate reports. Currently the library loads all language files when a Smorgasbord is initialized, which will get slow, fast. This should happen at the latest possible moment.\n* Unicode ranges in language files. Adding support for unicode ranges will probably be necesary for languages with large character sets.", "description_content_type": null, "docs_url": null, "download_url": null, "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/jackjennings/smorgasbord", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "smorgasbord", "package_url": "https://pypi.org/project/smorgasbord/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/smorgasbord/", "project_urls": { "Homepage": "http://github.com/jackjennings/smorgasbord" }, "release_url": "https://pypi.org/project/smorgasbord/0.0.2/", "requires_dist": null, "requires_python": null, "summary": "Reports coverage given a set of unicode values", "version": "0.0.2" }, "last_serial": 1235359, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "8c76f0225176620504286ac0ce3bb103", "sha256": "c0062ed067e6bddbce5a967484b0333f70ca916926dbdcca75bf40ff5f474b5d" }, "downloads": -1, "filename": "smorgasbord-0.0.1-py2.7.egg", "has_sig": false, "md5_digest": "8c76f0225176620504286ac0ce3bb103", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 10615, "upload_time": "2014-09-18T20:48:07", "url": "https://files.pythonhosted.org/packages/e9/7c/aa83ba355bc7985d5e506bea854963bd180d81def45dd393135c93758ad0/smorgasbord-0.0.1-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "853b1ebbc4aed38cccdba9aef8fc93ae", "sha256": "c613342e49d158bb4208d5529d24d6651bed5044cf30f7979b47573c16170af1" }, "downloads": -1, "filename": "smorgasbord-0.0.1.tar.gz", "has_sig": false, "md5_digest": "853b1ebbc4aed38cccdba9aef8fc93ae", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5741, "upload_time": "2014-09-18T20:48:11", "url": "https://files.pythonhosted.org/packages/c8/9c/468e9440a2919760124b0b9d4a3335e19a3fe4622b683349b4d2cede5904/smorgasbord-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "605ea49164892c637369235b7f8f2ef0", "sha256": "c7994838dec4eb6ef57c2d905903e9e863de797495132de13688cfb01ce7a281" }, "downloads": -1, "filename": "smorgasbord-0.0.2.tar.gz", "has_sig": false, "md5_digest": "605ea49164892c637369235b7f8f2ef0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5227, "upload_time": "2014-09-23T19:05:35", "url": "https://files.pythonhosted.org/packages/26/48/5a74059e7bd2f12347134454a0e086e11f6a3d213368a2aa34cdbdccd9be/smorgasbord-0.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "605ea49164892c637369235b7f8f2ef0", "sha256": "c7994838dec4eb6ef57c2d905903e9e863de797495132de13688cfb01ce7a281" }, "downloads": -1, "filename": "smorgasbord-0.0.2.tar.gz", "has_sig": false, "md5_digest": "605ea49164892c637369235b7f8f2ef0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5227, "upload_time": "2014-09-23T19:05:35", "url": "https://files.pythonhosted.org/packages/26/48/5a74059e7bd2f12347134454a0e086e11f6a3d213368a2aa34cdbdccd9be/smorgasbord-0.0.2.tar.gz" } ] }