{ "info": { "author": "Michael Martinides", "author_email": "msmart@posteo.de", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5" ], "description": "========\nhreports\n========\n\n\n.. image:: https://img.shields.io/pypi/v/hreports.svg\n :target: https://pypi.python.org/pypi/hreports\n\n.. image:: https://img.shields.io/travis/msmart/hreports.svg\n :target: https://travis-ci.org/msmart/hreports\n\n.. image:: https://readthedocs.org/projects/hreports/badge/?version=latest&v=0.1\n :target: https://hreports.readthedocs.io/en/latest/?badge=latest\n :alt: Documentation Status\n\n.. image:: https://pyup.io/repos/github/msmart/hreports/shield.svg\n :target: https://pyup.io/repos/github/msmart/hreports/\n :alt: Updates\n\n\nA simple wrapper to create and manage reports based on hledger queries.\n\n\n* Free software: MIT license\n* Documentation: https://hreports.readthedocs.io.\n\n\nFeatures\n--------\n\nhreports saves shortcuts to hledger queries to conveniently manage multiple\nqueries with different settings and ledger files. In addition, hreports can save\nthe query output to pdfs with jinja templates using Pandoc.\n\n* Conveniently create and manage multiple heldger queries\n* Customize the representation of hledger query results with templates\n* Save report results in pdf format\n* Parametrize queries\n* Use case: generate invoices with a single command, e.g. ``hreports save\n invoice_client1``\n* Use case: Manage tax reports, e.g. ``hreports show tax_2017``\n\nQuickstart\n----------\nEnsure that hledger_ is installed. If you want to save generate pdf reports\npandoc_ (>=1.16) and a PDF engine such as wkhtml2pdf_ need to be installed as well. Ensure to use the patched version wkthmltopdf to ensure \nhttps://github.com/wkhtmltopdf/wkhtmltopdf/issues/2037\n\nUse pip to install hreports::\n\n $ pip install hreports\n\nThe starting point of running hledger queries is having a ledger to run queries\nagainst. Imagine following simple hlegder file::\n\n $ cat cash-account.ledger\n 1917/12/14 * Income\n assets:cash 10 USD\n income:client1\n\n 1917/12/12 * Expense\n assets:cash 5 USD\n expense:milk\n\nand a hledger timesheet::\n\n $ cat timesheet.ledger\n 1917/12/14 * Time\n (consulting:clien1) 1\n\n\nThe following command creates a report named `balance` that executes the query\n`hledger bal --depth 1` on the ledger `cash.ledger`::\n\n $ hreports create balance --query \"bal --depth 1\" --ledger cash.ledger\n\nWhen executed, hreports stores the query data in a config file for future\nreference. Now hreports can render the query by running::\n\n $ hreports show balance\n 5 USD assets\n --------------------\n 5 USD\n\nThis makes it easy to store many different queries on different ledger files\nand executing them by refering to their hreports name.\n\nTemplating\n^^^^^^^^^^\nSometimes, it is helpful to add context to query results. hreports uses jinja\ntemplates to customize the representation of reports. The query results are\nadded to the `output` variabel in the context of the template. In addition,\nthe report configuration data, global configuration and custom variables\nare added.\n\nImagine the folowing simple template::\n\n $ cat balance.template\n The balance on {{ now }} the balance was\n\n {{ output|last }}\n\nhreports can now use this template to embed query results::\n\n $ hreports show balance --template balance.template\n The balance on 2017-12-15 15:39:11.519658 was:\n\n 5 USD \n\nIf you need this information for future reference, create a pdf of it by\nexecuting::\n\n $ hreports save balance --template balance.template\n Saved balance.pdf\n\nIf you keep reusing this command, simply your life by updating the report::\n\n $ hreports update balance --template balance.template\n\nNow hreports will always use the `balance.template` when rendering the balance\nreport.\n\nTemplating is also helpful when you use hledger for timetracking and\ninvoicing. Create a hreport and a simple demo template. Add a custom\nvariable name (\"hourly_rate\") and value (\"20\") with the `-var` option::\n\n $ hreports create timesheet --ledger timesheet.ledger -q \"bal\" -var hourly_rate 20 --template invoice.template\n\n $ cat invoice.template\n {% set hours = output|last|float|round(2) %}\n {% set net = hours * hourly_rate|float %}\n Please pay me {{ net }} USD.\n Signed {{ now|datetime(\"%Y/%m/%d\") }}\n\n $ hreports show timesheet\n Please pay me 20.0 USD.\n Signed on 2017/12/15\n\nAdmittedly, this is a somewhat simple example. But feel free to check out\n`heldger edit --template invoice_de.template` for a fully fledged template of a\nGerman invoice.\n\nFinally, all report configuration data is stored in a simple YAML file which\ncan be manipulated manually if preferred. To inspect and manipulated the\nconfig file run::\n\n $ hreports edit\n\n\nRoadmap\n---------\n* Add documentation\n* Add tests\n\nCredits\n---------\n\nThis package was created with Cookiecutter_ and the\n`audreyr/cookiecutter-pypackage`_ project template.\n\n.. _hledger: https://hledger.org\n.. _pandoc: https://pandoc.org\n.. _wkhtml2pdf: https://wkhtmltopdf.org\n.. _Cookiecutter: https://github.com/audreyr/cookiecutter\n.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage\n\n\n\n=======\nHistory\n=======\n\n0.2.1 (2018-12-23)\n------------------\n* Adds string decoding to output subprocess call \n* Updates dependencies and minor fixes\n\n0.2.0 (2018-04-01)\n------------------\n* Adds tests\n* Improves exception handling\n\n0.1.5 (2018-03-05)\n------------------\n* Adds template filter to create relative dates\n* Adds multiply_last_column template filter to add an extra column which multiplies the last string on each line with a custom factor\n* Adds percentage_column template filter to add an extra column which shows the percentage of the last string in a line in comparision to the buttom right value of the output \n* Preserves whitespace in double quotes for check_output command \n* Shows report listing in alphabetic order\n\n\n0.1.4 (2017-12-15)\n------------------\n\n* Adds first template (german invoice)\n* Adds exception catching for template rendering and hledger commands\n\n0.1.3 (2017-12-15)\n------------------\n\n* Adds templating and some initial documenation. \n\n0.1.2 (2017-12-03)\n------------------\n\n* First release on PyPI.\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/msmart/hreports", "keywords": "hreports", "license": "MIT license", "maintainer": "", "maintainer_email": "", "name": "hreports", "package_url": "https://pypi.org/project/hreports/", "platform": "", "project_url": "https://pypi.org/project/hreports/", "project_urls": { "Homepage": "https://github.com/msmart/hreports" }, "release_url": "https://pypi.org/project/hreports/0.2.1/", "requires_dist": [ "Click (>=6.0)", "PyYAML (>=3.12)", "Jinja2 (>=2.10)" ], "requires_python": "", "summary": "A simple wrapper to create and manage reports based on hledger queries.", "version": "0.2.1" }, "last_serial": 4629601, "releases": { "0.1.2": [ { "comment_text": "", "digests": { "md5": "763b5d05101da7b4b1c52fc2dec98b5e", "sha256": "a9a8cb97fb0eb5307d3f6c04167bc7c9a5fca3fd1ffce43c07ae9af29e25c967" }, "downloads": -1, "filename": "hreports-0.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "763b5d05101da7b4b1c52fc2dec98b5e", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8253, "upload_time": "2017-12-12T13:16:37", "url": "https://files.pythonhosted.org/packages/fa/a8/4715ddff986cafc6a0ce9652b6701dac3977cbe471701dff5054929a7562/hreports-0.1.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ce3b0eb76d4a5a97fdf4ee2628f4ac79", "sha256": "964ecaba602ad889c779749f195633bc2c338fe0d3d1fe01d087f7f520661fcb" }, "downloads": -1, "filename": "hreports-0.1.2.tar.gz", "has_sig": false, "md5_digest": "ce3b0eb76d4a5a97fdf4ee2628f4ac79", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22660, "upload_time": "2017-12-12T13:16:38", "url": "https://files.pythonhosted.org/packages/31/ae/cf2efb5a2726867dd2ef543690aa75ba7c7b87981180181fcdf2c4ddb04b/hreports-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "29a4bf61df6a65088dfb9f9e37bc7c03", "sha256": "f06472aefd7409604af52480a2d5c6ca009ecaff4f42d3378e5c8ad44264c4a4" }, "downloads": -1, "filename": "hreports-0.1.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "29a4bf61df6a65088dfb9f9e37bc7c03", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 11470, "upload_time": "2017-12-15T21:29:52", "url": "https://files.pythonhosted.org/packages/2a/1c/7b5c9b2be1f727d25074c27610470c744bea5e4115cc3de376e68dc13b67/hreports-0.1.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7762d9c0722324da209e8cad8d2fb54a", "sha256": "38a9a4c4a68cecb33c21360be0003d16abd110054928c14272b6ef384b7af497" }, "downloads": -1, "filename": "hreports-0.1.3.tar.gz", "has_sig": false, "md5_digest": "7762d9c0722324da209e8cad8d2fb54a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25080, "upload_time": "2017-12-15T21:29:54", "url": "https://files.pythonhosted.org/packages/03/3c/aa57ed0408c861bad3aad02d8dd70e0a10f20a6d04af7f61040b4154acbc/hreports-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "46d9e1bd9e8f3578eaa7c25d9af102e2", "sha256": "b1b03269965f59de595f2de5b08764d5b5cad7f2f4337b9c3bcd1bc42fa8796c" }, "downloads": -1, "filename": "hreports-0.1.4-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "46d9e1bd9e8f3578eaa7c25d9af102e2", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 13051, "upload_time": "2017-12-21T12:25:09", "url": "https://files.pythonhosted.org/packages/16/d0/e74f29718e0bd65fda1abac711f800b473aed3fc226c13351714aff6d09c/hreports-0.1.4-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1c62c048a14c3fcbca41ffb84a8b603d", "sha256": "e98e26996375b373908b2082686cb8fb1b0f3b7c61cc7aa7c5d391df9dd95111" }, "downloads": -1, "filename": "hreports-0.1.4.tar.gz", "has_sig": false, "md5_digest": "1c62c048a14c3fcbca41ffb84a8b603d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 26523, "upload_time": "2017-12-21T12:25:10", "url": "https://files.pythonhosted.org/packages/38/6b/3aa62ca553611bd5f97e687190ed2b387f715d646186c009220886821401/hreports-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "b7d02e51a031b8fd438f419f809ff051", "sha256": "0b7964f17f138f61313f9b3aab86fed9a85296eb748ab104194d8cd95926d998" }, "downloads": -1, "filename": "hreports-0.1.5-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b7d02e51a031b8fd438f419f809ff051", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 14491, "upload_time": "2018-03-06T13:39:34", "url": "https://files.pythonhosted.org/packages/4d/d6/5d23d2deb4f6123793a7241b546c6d6a986fb576f483c2ebc7d52f780f97/hreports-0.1.5-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "59ad3ac89254903cd6fd6a852e3eb203", "sha256": "d54b79b46001e3da2062a70e231052af7df9aeba9d9ae9b59baedd45cf06afcd" }, "downloads": -1, "filename": "hreports-0.1.5.tar.gz", "has_sig": false, "md5_digest": "59ad3ac89254903cd6fd6a852e3eb203", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 27727, "upload_time": "2018-03-06T13:39:36", "url": "https://files.pythonhosted.org/packages/4e/81/4f7d21488021c7fac5be6feec48f2d69f7d66c51c8f05273f97df25c71d7/hreports-0.1.5.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "3272d8f4a4b33530121fe697466a7d02", "sha256": "58aec66bf3023094da1fed31104803245bcb4daf7263a7e8b0db6c8b3417a80a" }, "downloads": -1, "filename": "hreports-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "3272d8f4a4b33530121fe697466a7d02", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 14801, "upload_time": "2018-04-01T14:51:54", "url": "https://files.pythonhosted.org/packages/17/6e/b318af3de8f7c775100752b1ee4ffe1dc22f58b5558ab9c6049d7d5a1c8c/hreports-0.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ac964951c55966b32906bd61d3cdf1f8", "sha256": "d3ef5fa20567b474f0c976ae7a795f25e266fe75b48d55d72b2eeb4d9ad9af76" }, "downloads": -1, "filename": "hreports-0.2.0.tar.gz", "has_sig": false, "md5_digest": "ac964951c55966b32906bd61d3cdf1f8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 32616, "upload_time": "2018-04-01T14:51:56", "url": "https://files.pythonhosted.org/packages/91/e6/06b5a2115bf740a2011d7cf05d1602a0235fa9f563cea514734d9451236b/hreports-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "6c8102a69b0e8474713b5077074ddb17", "sha256": "baa02fad8fd4580b1cae91a5ddf1b70415035dade515670edb755be2a50d9e83" }, "downloads": -1, "filename": "hreports-0.2.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "6c8102a69b0e8474713b5077074ddb17", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 15396, "upload_time": "2018-12-23T14:29:39", "url": "https://files.pythonhosted.org/packages/0b/b3/ccbaf51ebac542b6168deab50c403aa22e49833c0905709813f294f4e6bf/hreports-0.2.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "03fca7a4548d27910696f5320409200e", "sha256": "34982f309af9e7e7a4d6636061a2d9e4e3ea91eedb4043b8801360ce593db6eb" }, "downloads": -1, "filename": "hreports-0.2.1.tar.gz", "has_sig": false, "md5_digest": "03fca7a4548d27910696f5320409200e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 31829, "upload_time": "2018-12-23T14:29:43", "url": "https://files.pythonhosted.org/packages/e8/cc/780bc00c71412a86c65bda2f74052660d1cdba529732e28d2f520621d259/hreports-0.2.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "6c8102a69b0e8474713b5077074ddb17", "sha256": "baa02fad8fd4580b1cae91a5ddf1b70415035dade515670edb755be2a50d9e83" }, "downloads": -1, "filename": "hreports-0.2.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "6c8102a69b0e8474713b5077074ddb17", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 15396, "upload_time": "2018-12-23T14:29:39", "url": "https://files.pythonhosted.org/packages/0b/b3/ccbaf51ebac542b6168deab50c403aa22e49833c0905709813f294f4e6bf/hreports-0.2.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "03fca7a4548d27910696f5320409200e", "sha256": "34982f309af9e7e7a4d6636061a2d9e4e3ea91eedb4043b8801360ce593db6eb" }, "downloads": -1, "filename": "hreports-0.2.1.tar.gz", "has_sig": false, "md5_digest": "03fca7a4548d27910696f5320409200e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 31829, "upload_time": "2018-12-23T14:29:43", "url": "https://files.pythonhosted.org/packages/e8/cc/780bc00c71412a86c65bda2f74052660d1cdba529732e28d2f520621d259/hreports-0.2.1.tar.gz" } ] }