{ "info": { "author": "B2CK", "author_email": "info@b2ck.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Operating System :: OS Independent", "Programming Language :: Python :: 2.7", "Topic :: Office/Business :: Financial", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "escpos-xml\r\n==========\r\n\r\nescpos-xml is a library to parse XML defined receipt and print it on ESC/POS\r\nPrinter using python-escpos library.\r\n\r\nThe module contains a RELAX NG schema for the XML: `escpos_xml/escpos.rng`.\r\nThe syntax is quite similar to HTML.\r\n\r\nExample:\r\n--------\r\n\r\n >>> import os\r\n >>> from io import BytesIO, open\r\n >>> from escpos.printer import Usb\r\n >>> from escpos_xml import parse\r\n >>> xml = BytesIO('''\r\n ... \r\n ...

Receipt!

\r\n ... \r\n ...
\r\n ...

\r\n ... TOTAL\r\n ... 0.15\u20ac\r\n ...

\r\n ... \r\n ... 5449000000996\r\n ... \r\n ... \r\n ... \r\n ...
''')\r\n >>> printer = Usb(0x0483, 0x5743)\r\n >>> parse(printer, xml)\r\n >>> parse(printer,\r\n ... open(os.path.join('escpos_xml', 'tests', 'image.xml'), 'rb'))\r\n\r\nDocumenation:\r\n-------------\r\n\r\nRoot\r\n~~~~\r\n\r\nThe root element is `receipt` with the optional attribute `width` which is the\r\nnumber of character in a line.\r\n\r\nIn-lines:\r\n~~~~~~~~~\r\n\r\nThe tags for in-line elements are: `bold`, `b` and `span`.\r\nThe attribute available are: `bold`, `underline`, `size`, `font`, `inverted`\r\nand `color`.\r\nThe `span` element can have also the attributes `align` and `width`.\r\n\r\nBlocks:\r\n~~~~~~~\r\n\r\nThe tags for block element are: `p`, `h(1-5)` and `hr`.\r\nThe attributes are the same as the in-line elements with in addition the\r\n`align` which could be `left`, `right` or `center`.\r\n\r\nLists:\r\n~~~~~~\r\n\r\nIt is possible to have ordered or unordered lists with the elements `ol` and\r\n`ul`. The type of bullet is defined by the attribute `type`. For ordered list,\r\nthe start number can be specify with the `start` attribute.\r\nEach item is defined by an element `li` which has the same attributes as the\r\nin-line elements.\r\n\r\nThe list can be nested.\r\n\r\nBarcode:\r\n~~~~~~~~\r\n\r\nThe `barcode` element print the code using the `encoding` attribute as format.\r\nOther attributes are: `width`, `height`, `position` and `font`.\r\n\r\nImage:\r\n~~~~~~\r\n\r\nThe `img` element print the image defined by the `src` attribute using a base64\r\ndata-url format.\r\nExample::\r\n\r\n \r\n\r\nOperations:\r\n~~~~~~~~~~~\r\n\r\nSome operations are available: `cut`, `partialcut` and `cashdraw`.\r\nThe `cashdraw` element requires a `pin` attribute.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://hg.b2ck.com/python-escpos-xml/", "keywords": "escpos XML", "license": "GPL-3", "maintainer": "", "maintainer_email": "", "name": "python-escpos-xml", "package_url": "https://pypi.org/project/python-escpos-xml/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/python-escpos-xml/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://hg.b2ck.com/python-escpos-xml/" }, "release_url": "https://pypi.org/project/python-escpos-xml/0.1.0/", "requires_dist": null, "requires_python": null, "summary": "Print XML defined receipt on ESC/POS Printer", "version": "0.1.0" }, "last_serial": 3800612, "releases": { "0": [], "0.1.0": [ { "comment_text": "", "digests": { "md5": "474763da1a96730c1a161950ef8ea4af", "sha256": "c3c171c2a1b0a6a3ce87460262494e24d252b87742179e18d32971c88c913f4c" }, "downloads": -1, "filename": "python-escpos-xml-0.1.0.tar.gz", "has_sig": true, "md5_digest": "474763da1a96730c1a161950ef8ea4af", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 27955, "upload_time": "2016-02-29T11:34:47", "url": "https://files.pythonhosted.org/packages/45/ae/fb081c18fd7447df5229edcf2ae9b8143edb37c363d3be04ee59cbec5f4d/python-escpos-xml-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "474763da1a96730c1a161950ef8ea4af", "sha256": "c3c171c2a1b0a6a3ce87460262494e24d252b87742179e18d32971c88c913f4c" }, "downloads": -1, "filename": "python-escpos-xml-0.1.0.tar.gz", "has_sig": true, "md5_digest": "474763da1a96730c1a161950ef8ea4af", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 27955, "upload_time": "2016-02-29T11:34:47", "url": "https://files.pythonhosted.org/packages/45/ae/fb081c18fd7447df5229edcf2ae9b8143edb37c363d3be04ee59cbec5f4d/python-escpos-xml-0.1.0.tar.gz" } ] }