{"id":37073980,"url":"https://github.com/msmart/hreports","last_synced_at":"2026-01-14T08:42:51.386Z","repository":{"id":27226629,"uuid":"112955381","full_name":"msmart/hreports","owner":"msmart","description":"A simple wrapper to create and manage reports based on hledger queries.","archived":false,"fork":false,"pushed_at":"2024-12-02T18:14:20.000Z","size":126,"stargazers_count":11,"open_issues_count":5,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-02T19:27:50.464Z","etag":null,"topics":["accounting","cli","finance","hledger","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/msmart.png","metadata":{"files":{"readme":"README.rst","changelog":"HISTORY.rst","contributing":"CONTRIBUTING.rst","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS.rst","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-12-03T19:08:05.000Z","updated_at":"2024-08-28T15:12:09.000Z","dependencies_parsed_at":"2024-09-09T21:47:26.093Z","dependency_job_id":"bf7205a7-6032-4756-92a8-32a1577ec667","html_url":"https://github.com/msmart/hreports","commit_stats":{"total_commits":130,"total_committers":4,"mean_commits":32.5,"dds":0.3384615384615385,"last_synced_commit":"bcae1c10aaa6539e84e8c51dcbcba51e9511a83e"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/msmart/hreports","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msmart%2Fhreports","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msmart%2Fhreports/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msmart%2Fhreports/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msmart%2Fhreports/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/msmart","download_url":"https://codeload.github.com/msmart/hreports/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msmart%2Fhreports/sbom","scorecard":{"id":665882,"data":{"date":"2025-08-11","repo":{"name":"github.com/msmart/hreports","commit":"bcae1c10aaa6539e84e8c51dcbcba51e9511a83e"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.3,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Code-Review","score":4,"reason":"Found 3/7 approved changesets -- score normalized to 4","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 26 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"12 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-3ww4-gg4f-jr7f","Warn: Project is vulnerable to: GHSA-5cpq-8wj7-hf2v","Warn: Project is vulnerable to: GHSA-9v9h-cgj8-h64p","Warn: Project is vulnerable to: PYSEC-2021-62 / GHSA-hggm-jpg3-v476","Warn: Project is vulnerable to: GHSA-jm77-qphf-c4w8","Warn: Project is vulnerable to: GHSA-v8gr-m533-ghj9","Warn: Project is vulnerable to: GHSA-w7pp-m8wf-vj6r","Warn: Project is vulnerable to: GHSA-x4qr-2fvf-3mr5","Warn: Project is vulnerable to: PYSEC-2021-437 / GHSA-5xp3-jfq3-5q8x","Warn: Project is vulnerable to: PYSEC-2023-228 / GHSA-mq26-g339-26xf","Warn: Project is vulnerable to: PYSEC-2021-142 / GHSA-8q59-q68h-6hv4","Warn: Project is vulnerable to: PYSEC-2022-43017 / GHSA-qwmp-2cf2-g9g6"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-21T18:00:44.555Z","repository_id":27226629,"created_at":"2025-08-21T18:00:44.555Z","updated_at":"2025-08-21T18:00:44.555Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28414690,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T08:38:59.149Z","status":"ssl_error","status_checked_at":"2026-01-14T08:38:43.588Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["accounting","cli","finance","hledger","python"],"created_at":"2026-01-14T08:42:50.814Z","updated_at":"2026-01-14T08:42:51.374Z","avatar_url":"https://github.com/msmart.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"========\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\u0026v=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_ (\u003e=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[ ~ Dependencies scanned by PyUp.io ~ ]\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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsmart%2Fhreports","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmsmart%2Fhreports","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsmart%2Fhreports/lists"}