{ "info": { "author": "C.W.", "author_email": "wangc_2011@hotmail.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Programming Language :: Python", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Office/Business", "Topic :: Software Development :: Libraries", "Topic :: Utilities" ], "description": "================================================================================\npyexcel-htmlr - Let you focus on data, instead of html format\n================================================================================\n\n.. image:: https://raw.githubusercontent.com/pyexcel/pyexcel.github.io/master/images/patreon.png\n :target: https://www.patreon.com/pyexcel\n\n.. image:: https://api.travis-ci.org/pyexcel/pyexcel-htmlr.svg?branch=master\n :target: http://travis-ci.org/pyexcel/pyexcel-htmlr\n\n.. image:: https://codecov.io/gh/pyexcel/pyexcel-htmlr/branch/master/graph/badge.svg\n :target: https://codecov.io/gh/pyexcel/pyexcel-htmlr\n\n.. image:: https://img.shields.io/gitter/room/gitterHQ/gitter.svg\n :target: https://gitter.im/pyexcel/Lobby\n\n\nKnown constraints\n==================\n\nFonts, colors and charts are not supported.\n\nInstallation\n================================================================================\n\nYou can install it via pip:\n\n.. code-block:: bash\n\n $ pip install pyexcel-htmlr\n\n\nor clone it and install it:\n\n.. code-block:: bash\n\n $ git clone https://github.com/pyexcel/pyexcel-htmlr.git\n $ cd pyexcel-htmlr\n $ python setup.py install\n\nSupport the project\n================================================================================\n\nIf your company has embedded pyexcel and its components into a revenue generating\nproduct, please `support me on patreon `_ to\nmaintain the project and develop it further.\n\nIf you are an individual, you are welcome to support me too on patreon and for however long\nyou feel like to. As a patreon, you will receive\n`early access to pyexcel related contents `_.\n\nWith your financial support, I will be able to invest\na little bit more time in coding, documentation and writing interesting posts.\n\n\nUsage\n================================================================================\n\nAs a standalone library\n--------------------------------------------------------------------------------\n\n\t>>> import pyexcel as pe\n >>> if sys.version_info[0] < 3:\n ... from StringIO import StringIO\n ... else:\n ... from io import BytesIO as StringIO\n >>> PY2 = sys.version_info[0] == 2\n >>> if PY2 and sys.version_info[1] < 7:\n ... from ordereddict import OrderedDict\n ... else:\n ... from collections import OrderedDict\n >>> \n >>> data = OrderedDict() # from collections import OrderedDict\n >>> data.update({\"Sheet 1\": [[1, 2, 3], [4, 5, 6]]})\n >>> data.update({\"Sheet 2\": [[\"row 1\", \"row 2\", \"row 3\"]]})\n >>> book = pe.get_book(bookdict=data)\n\t>>> book.save_as(\"your_file.html\")\n\nRead from an html file\n********************************************************************************\n\nHere's the sample code:\n\n.. code-block:: python\n\n >>> from pyexcel_htmlr import get_data\n >>> data = get_data(\"your_file.html\")\n >>> import json\n >>> print(json.dumps(data))\n {\"Table 1\": [[1, 2, 3], [4, 5, 6]], \"Table 2\": [[\"row 1\", \"row 2\", \"row 3\"]]}\n\n\n\n\nRead from an html from memory\n********************************************************************************\n\nContinue from previous example:\n\n.. code-block:: python\n\n >>> # This is just an illustration\n >>> # In reality, you might deal with html file upload\n >>> # where you will read from requests.FILES['YOUR_HTML_FILE']\n >>> data = get_data(book.stream.html)\n >>> print(json.dumps(data))\n {\"Table 1\": [[1, 2, 3], [4, 5, 6]], \"Table 2\": [[\"row 1\", \"row 2\", \"row 3\"]]}\n\n\n\nPagination feature\n********************************************************************************\n\n\n\nLet's assume the following file is a huge html file:\n\n.. code-block:: python\n\n >>> huge_data = [\n ... [1, 21, 31],\n ... [2, 22, 32],\n ... [3, 23, 33],\n ... [4, 24, 34],\n ... [5, 25, 35],\n ... [6, 26, 36]\n ... ]\n >>> sheetx = {\n ... \"huge\": huge_data\n ... }\n >>> pe.save_as(bookdict=sheetx, dest_file_name=\"huge_file.html\")\n\nAnd let's pretend to read partial data:\n\n.. code-block:: python\n\n >>> partial_data = get_data(\"huge_file.html\", start_row=2, row_limit=3)\n >>> print(json.dumps(partial_data))\n {\"Table 1\": [[3, 23, 33], [4, 24, 34], [5, 25, 35]]}\n\nAnd you could as well do the same for columns:\n\n.. code-block:: python\n\n >>> partial_data = get_data(\"huge_file.html\", start_column=1, column_limit=2)\n >>> print(json.dumps(partial_data))\n {\"Table 1\": [[21, 31], [22, 32], [23, 33], [24, 34], [25, 35], [26, 36]]}\n\nObvious, you could do both at the same time:\n\n.. code-block:: python\n\n >>> partial_data = get_data(\"huge_file.html\",\n ... start_row=2, row_limit=3,\n ... start_column=1, column_limit=2)\n >>> print(json.dumps(partial_data))\n {\"Table 1\": [[23, 33], [24, 34], [25, 35]]}\n\nAs a pyexcel plugin\n--------------------------------------------------------------------------------\n\nNo longer, explicit import is needed since pyexcel version 0.2.2. Instead,\nthis library is auto-loaded. So if you want to read data in html format,\ninstalling it is enough.\n\n\nReading from an html file\n********************************************************************************\n\nHere is the sample code:\n\n.. code-block:: python\n\n >>> import pyexcel as pe\n >>> sheet = pe.get_book(file_name=\"your_file.html\")\n >>> sheet\n Table 1:\n +---+---+---+\n | 1 | 2 | 3 |\n +---+---+---+\n | 4 | 5 | 6 |\n +---+---+---+\n Table 2:\n +-------+-------+-------+\n | row 1 | row 2 | row 3 |\n +-------+-------+-------+\n\n\n\n\nReading from a IO instance\n********************************************************************************\n\nYou got to wrap the binary content with stream to get html working:\n\n.. code-block:: python\n\n >>> # This is just an illustration\n >>> # In reality, you might deal with html file upload\n >>> # where you will read from requests.FILES['YOUR_HTML_FILE']\n >>> htmlfile = \"your_file.html\"\n >>> with open(htmlfile, \"r\") as f:\n ... content = f.read()\n ... r = pe.get_book(file_type=\"html\", file_content=content)\n ... print(r)\n ...\n Table 1:\n +---+---+---+\n | 1 | 2 | 3 |\n +---+---+---+\n | 4 | 5 | 6 |\n +---+---+---+\n Table 2:\n +-------+-------+-------+\n | row 1 | row 2 | row 3 |\n +-------+-------+-------+\n\n\n\n\nLicense\n================================================================================\n\nNew BSD License\n\nDeveloper guide\n==================\n\nDevelopment steps for code changes\n\n#. git clone https://github.com/pyexcel/pyexcel-htmlr.git\n#. cd pyexcel-htmlr\n\nUpgrade your setup tools and pip. They are needed for development and testing only:\n\n#. pip install --upgrade setuptools pip\n\nThen install relevant development requirements:\n\n#. pip install -r rnd_requirements.txt # if such a file exists\n#. pip install -r requirements.txt\n#. pip install -r tests/requirements.txt\n\nOnce you have finished your changes, please provide test case(s), relevant documentation\nand update CHANGELOG.rst.\n\n.. note::\n\n As to rnd_requirements.txt, usually, it is created when a dependent\n\tlibrary is not released. Once the dependecy is installed\n\t(will be released), the future\n\tversion of the dependency in the requirements.txt will be valid.\n\n\nHow to test your contribution\n------------------------------\n\nAlthough `nose` and `doctest` are both used in code testing, it is adviable that unit tests are put in tests. `doctest` is incorporated only to make sure the code examples in documentation remain valid across different development releases.\n\nOn Linux/Unix systems, please launch your tests like this::\n\n $ make\n\nOn Windows systems, please issue this command::\n\n > test.bat\n\nHow to update test environment and update documentation\n---------------------------------------------------------\n\nAdditional steps are required:\n\n#. pip install moban\n#. git clone https://github.com/pyexcel/pyexcel-commons.git commons\n#. make your changes in `.moban.d` directory, then issue command `moban`\n\nWhat is pyexcel-commons\n---------------------------------\n\nMany information that are shared across pyexcel projects, such as: this developer guide, license info, etc. are stored in `pyexcel-commons` project.\n\nWhat is .moban.d\n---------------------------------\n\n`.moban.d` stores the specific meta data for the library.\n\nAcceptance criteria\n-------------------\n\n#. Has Test cases written\n#. Has all code lines tested\n#. Passes all Travis CI builds\n#. Has fair amount of documentation if your change is complex\n#. Agree on NEW BSD License for your contribution\n\n\n\n\nChange log\n===========\n\n0.5.2 - 23.10.2017\n--------------------------------------------------------------------------------\n\nupdated\n++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n#. pyexcel `#105 `_, remove gease\n from setup_requires, introduced by 0.5.1.\n#. remove python2.6 test support\n#. update its dependecy on pyexcel-io to 0.5.3\n\n0.5.1 - 20.10.2017\n--------------------------------------------------------------------------------\n\nadded\n++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n\n#. `#103 `_, include LICENSE file\n in MANIFEST.in, meaning LICENSE file will appear in the released tar ball.\n\n0.5.0 - 30.08.2017\n--------------------------------------------------------------------------------\n\nUpdated\n********************************************************************************\n\n#. put dependency on pyexcel-io 0.5.0, which uses cStringIO instead of StringIO.\n Hence, there will be performance boost in handling files in memory.\n#. version jumped because it will be easy to see pyexcel-htmlr depends on\n pyexcel-io v0.5.0\n\nRelocated\n********************************************************************************\n\n#. type detection code is being relocated into pyexcel-io\n\n0.0.1 - 26-07-2017\n---------------------------\n\nInitial release\n\n", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/pyexcel/pyexcel-htmlr/archive/0.5.2.tar.gz", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/pyexcel/pyexcel-htmlr", "keywords": "python", "license": "New BSD", "maintainer": "", "maintainer_email": "", "name": "pyexcel-htmlr", "package_url": "https://pypi.org/project/pyexcel-htmlr/", "platform": "", "project_url": "https://pypi.org/project/pyexcel-htmlr/", "project_urls": { "Download": "https://github.com/pyexcel/pyexcel-htmlr/archive/0.5.2.tar.gz", "Homepage": "https://github.com/pyexcel/pyexcel-htmlr" }, "release_url": "https://pypi.org/project/pyexcel-htmlr/0.5.2/", "requires_dist": null, "requires_python": "", "summary": "read tables in html file as excel data", "version": "0.5.2" }, "last_serial": 3273007, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "c6ee2ff54cb3f28929028fbf3a44dbc4", "sha256": "fadd30bf05d479c6e7dc5319a636d2df6915f04cd485f3a22a30582d199ee2f8" }, "downloads": -1, "filename": "pyexcel_htmlr-0.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "c6ee2ff54cb3f28929028fbf3a44dbc4", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 10696, "upload_time": "2017-07-25T23:13:48", "url": "https://files.pythonhosted.org/packages/be/b2/5c5364508624d1ddbaa91927034bb8d378c5da76cfb1876c7b52cc11e529/pyexcel_htmlr-0.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3db04a81d05a41cd3e0e727470c0fa72", "sha256": "361c16a2f9c4e10272abdc569aa95853cd6adcfe81fe1c993892bb5f187b96e1" }, "downloads": -1, "filename": "pyexcel-htmlr-0.0.1.tar.gz", "has_sig": false, "md5_digest": "3db04a81d05a41cd3e0e727470c0fa72", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7903, "upload_time": "2017-07-25T23:13:46", "url": "https://files.pythonhosted.org/packages/5f/e4/98e74e6c118f3bf5d5f8c23ba636c8ad077492dde6aff10c3ea260c896ab/pyexcel-htmlr-0.0.1.tar.gz" } ], "0.5.0": [ { "comment_text": "", "digests": { "md5": "90a7c1af5f2e5c3807f506fef136d878", "sha256": "e4a3db26e681350b4425724feff276878856364e7264564e52cee5486387c714" }, "downloads": -1, "filename": "pyexcel_htmlr-0.5.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "90a7c1af5f2e5c3807f506fef136d878", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 10670, "upload_time": "2017-08-30T23:05:36", "url": "https://files.pythonhosted.org/packages/d2/2c/62872d03eb0512f744a592a149e9dd9bf09198d5fa809f935d044cf6e51c/pyexcel_htmlr-0.5.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "dfdff4ac6a115602070b2098633b92bf", "sha256": "1272a5892825997b5c9c0c45854182c9e37913683f7ed9b19f29f26c02cacebc" }, "downloads": -1, "filename": "pyexcel-htmlr-0.5.0.tar.gz", "has_sig": false, "md5_digest": "dfdff4ac6a115602070b2098633b92bf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7792, "upload_time": "2017-08-30T23:05:32", "url": "https://files.pythonhosted.org/packages/1b/81/dccbd874858e614a0931e2417d429c645e7c483d51159b2707574b667d97/pyexcel-htmlr-0.5.0.tar.gz" } ], "0.5.1": [ { "comment_text": "", "digests": { "md5": "707bc2c3f274f8c9d248944b20474792", "sha256": "a2efb7f48a7c5235e51a120be570e639c8e5950132002bc40a9f7d826b9f37fa" }, "downloads": -1, "filename": "pyexcel_htmlr-0.5.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "707bc2c3f274f8c9d248944b20474792", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 10867, "upload_time": "2017-10-20T07:36:31", "url": "https://files.pythonhosted.org/packages/67/48/4f392c47dba83bcf88ceb80d29254f04cb6580e199983c7fc02ed74aa716/pyexcel_htmlr-0.5.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "22840743720ac4a86fbeb1ffd3fb8ef4", "sha256": "addfea875a81499e822321ec5aa7e8f062278ec7b35271fa9645b8a64131dee0" }, "downloads": -1, "filename": "pyexcel-htmlr-0.5.1.tar.gz", "has_sig": false, "md5_digest": "22840743720ac4a86fbeb1ffd3fb8ef4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9744, "upload_time": "2017-10-20T07:36:26", "url": "https://files.pythonhosted.org/packages/56/e0/1685caf8dad4945740d796bb7ef8917dd6d18945f774849d3ef25ab23987/pyexcel-htmlr-0.5.1.tar.gz" } ], "0.5.2": [ { "comment_text": "", "digests": { "md5": "60b18d062c64447940b7b03cca904682", "sha256": "f4be7a6d13fc8387086b311d426a687940892d4b3babefda2ff396c813fdd9e2" }, "downloads": -1, "filename": "pyexcel_htmlr-0.5.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "60b18d062c64447940b7b03cca904682", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 11041, "upload_time": "2017-10-23T18:56:05", "url": "https://files.pythonhosted.org/packages/8d/12/73ca17fd575699edc01aeed8772fae287f231ddf7c19b7dad8e07d70af47/pyexcel_htmlr-0.5.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c4f9114fa4ca430ffc9e8a1c16972422", "sha256": "36b65c0c9eb97cd9322fb13e54a7156e05dad49a0a62292021a63487ad8ede90" }, "downloads": -1, "filename": "pyexcel-htmlr-0.5.2.tar.gz", "has_sig": false, "md5_digest": "c4f9114fa4ca430ffc9e8a1c16972422", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10094, "upload_time": "2017-10-23T18:56:01", "url": "https://files.pythonhosted.org/packages/ab/26/e979a3f01a03d98b186c40e8f6546beee80be6a9fc517048e12939ac71d3/pyexcel-htmlr-0.5.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "60b18d062c64447940b7b03cca904682", "sha256": "f4be7a6d13fc8387086b311d426a687940892d4b3babefda2ff396c813fdd9e2" }, "downloads": -1, "filename": "pyexcel_htmlr-0.5.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "60b18d062c64447940b7b03cca904682", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 11041, "upload_time": "2017-10-23T18:56:05", "url": "https://files.pythonhosted.org/packages/8d/12/73ca17fd575699edc01aeed8772fae287f231ddf7c19b7dad8e07d70af47/pyexcel_htmlr-0.5.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c4f9114fa4ca430ffc9e8a1c16972422", "sha256": "36b65c0c9eb97cd9322fb13e54a7156e05dad49a0a62292021a63487ad8ede90" }, "downloads": -1, "filename": "pyexcel-htmlr-0.5.2.tar.gz", "has_sig": false, "md5_digest": "c4f9114fa4ca430ffc9e8a1c16972422", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10094, "upload_time": "2017-10-23T18:56:01", "url": "https://files.pythonhosted.org/packages/ab/26/e979a3f01a03d98b186c40e8f6546beee80be6a9fc517048e12939ac71d3/pyexcel-htmlr-0.5.2.tar.gz" } ] }