{"id":21323376,"url":"https://github.com/marek-g/rust-ledger-parser","last_synced_at":"2025-10-06T14:37:21.541Z","repository":{"id":33176463,"uuid":"150886439","full_name":"marek-g/rust-ledger-parser","owner":"marek-g","description":"Rust library for parsing ledger cli (https://www.ledger-cli.org/) input files.","archived":false,"fork":false,"pushed_at":"2024-06-06T16:15:28.000Z","size":105,"stargazers_count":35,"open_issues_count":0,"forks_count":9,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-08-21T02:47:28.392Z","etag":null,"topics":["ledger","ledger-cli","parser","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/marek-g.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-09-29T17:15:54.000Z","updated_at":"2025-01-17T14:42:42.000Z","dependencies_parsed_at":"2024-11-21T20:37:27.977Z","dependency_job_id":null,"html_url":"https://github.com/marek-g/rust-ledger-parser","commit_stats":{"total_commits":84,"total_committers":9,"mean_commits":9.333333333333334,"dds":"0.47619047619047616","last_synced_commit":"76b3a5972f25cd766712bb839b1e47291bcb5b7b"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/marek-g/rust-ledger-parser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marek-g%2Frust-ledger-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marek-g%2Frust-ledger-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marek-g%2Frust-ledger-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marek-g%2Frust-ledger-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marek-g","download_url":"https://codeload.github.com/marek-g/rust-ledger-parser/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marek-g%2Frust-ledger-parser/sbom","scorecard":{"id":618726,"data":{"date":"2025-08-11","repo":{"name":"github.com/marek-g/rust-ledger-parser","commit":"ba7e27001c082f34873001c18bce420370384a1f"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"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":"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":"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":"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":"Code-Review","score":3,"reason":"Found 5/15 approved changesets -- score normalized to 3","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":"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":"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":"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":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"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: UNLICENSE.txt:0","Info: FSF or OSI recognized license: The Unlicense: UNLICENSE.txt: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 20 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"}}]},"last_synced_at":"2025-08-21T04:41:29.110Z","repository_id":33176463,"created_at":"2025-08-21T04:41:29.110Z","updated_at":"2025-08-21T04:41:29.110Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278626271,"owners_count":26018088,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-06T02:00:05.630Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["ledger","ledger-cli","parser","rust"],"created_at":"2024-11-21T20:23:36.132Z","updated_at":"2025-10-06T14:37:21.521Z","avatar_url":"https://github.com/marek-g.png","language":"Rust","readme":"# ledger-parser\n\n[![Crates.io Version](https://img.shields.io/crates/v/ledger-parser.svg)](https://crates.io/crates/ledger-parser)\n[![Docs.rs Version](https://docs.rs/ledger-parser/badge.svg)](https://docs.rs/ledger-parser)\n[![License Unlicense](https://img.shields.io/crates/l/ledger-parser.svg)](http://unlicense.org/UNLICENSE)\n\nRust library for parsing [Ledger-cli](https://www.ledger-cli.org/) input files.\n\n## File format\n\nOnly a subset of the ledger-cli's file format is implemented.\n\nSupported elements:\n\n- Line comments (starting with: `; # % | *`)\n\n- Inline comments (starting with `;`)\n\n- Transaction headers with format (minimum two spaces or one tab between `DESC` and `NOTE`):\n\n  ```ledger-cli\n  DATE[=EDATE] [*|!] [(CODE)] DESC  [; NOTE]\n  ```\n\n- Transaction postings with format (minimum two spaces or one tab between `ACCOUNT` and `AMOUNT`):\n\n  ```ledger-cli\n    ACCOUNT  [AMOUNT] [= BALANCE] [; NOTE]\n  ```\n\n  - Virtual accounts are supported\n\n  - Posting comments with dates, effective dates, and metadata tags are supported\n  ```ledger-cli\n    ACCOUNT  [AMOUNT] [= BALANCE]  ; [YYYY-MM-DD]\n    ACCOUNT  [AMOUNT] [= BALANCE]  ; [=YYYY-MM-DD]\n    ACCOUNT  [AMOUNT] [= BALANCE]  ; :TAG1:TAG2:\n    ACCOUNT  [AMOUNT] [= BALANCE]  ; Tag: String Value\n    ACCOUNT  [AMOUNT] [= BALANCE]  ; Tag:: -1\n    ACCOUNT  [AMOUNT] [= BALANCE]  ; Tag:: 1.0\n    ACCOUNT  [AMOUNT] [= BALANCE]  ; Tag:: [YYYY-MM-DD]\n  ```\n\n- `AMOUNT` can be combined with lot and commodity prices ({}, {{}}, @, @@)\n\n- Commodity prices with format:\n\n  ```ledger-cli\n  P DATE SYMBOL PRICE\n  ```\n\n- Command directives: `include`\n\n## Example\n\nParsing:\n\n```rust\nlet ledger: ledger_parser::Ledger = r#\"; Example 1\n2018-10-01=2018-10-14 ! (123) Description\n  ; Transaction comment\n  TEST:Account 123  $1.20\n  ; Posting comment\n  TEST:Account 345  -$1.20\"#\n    .parse()?;\n```\n\nSerializing:\n\n```rust\nuse ledger_parser::{ Serializer, SerializerSettings };\n\nprintln!(\"{}\", ledger);\nprintln!(\"{}\", ledger.to_string_pretty(\u0026SerializerSettings::default().with_indent(\"\\t\")));\n```\n\n## See also\n\n- [ledger-utils](https://crates.io/crates/ledger-utils) - ledger-cli file processing Rust library, useful for calculating balances, creating reports etc.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarek-g%2Frust-ledger-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarek-g%2Frust-ledger-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarek-g%2Frust-ledger-parser/lists"}