{"id":21323371,"url":"https://github.com/marek-g/rust-ledger-utils","last_synced_at":"2025-07-12T05:31:44.622Z","repository":{"id":44778518,"uuid":"444407378","full_name":"marek-g/rust-ledger-utils","owner":"marek-g","description":"Ledger-cli (https://www.ledger-cli.org/) file processing Rust library, useful for calculating balances, creating reports etc.","archived":false,"fork":false,"pushed_at":"2024-03-14T10:10:17.000Z","size":79,"stargazers_count":3,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-31T11:53:33.474Z","etag":null,"topics":[],"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}},"created_at":"2022-01-04T12:16:41.000Z","updated_at":"2023-12-14T00:58:27.000Z","dependencies_parsed_at":"2024-03-14T11:28:55.395Z","dependency_job_id":"4296cef8-505a-4826-affd-b3d4b6901539","html_url":"https://github.com/marek-g/rust-ledger-utils","commit_stats":{"total_commits":19,"total_committers":2,"mean_commits":9.5,"dds":"0.26315789473684215","last_synced_commit":"a5fab81680249832ca94f15cc1fc9c89a891497b"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marek-g%2Frust-ledger-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marek-g%2Frust-ledger-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marek-g%2Frust-ledger-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marek-g%2Frust-ledger-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marek-g","download_url":"https://codeload.github.com/marek-g/rust-ledger-utils/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225797150,"owners_count":17525638,"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","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":[],"created_at":"2024-11-21T20:23:32.707Z","updated_at":"2024-11-21T20:23:33.262Z","avatar_url":"https://github.com/marek-g.png","language":"Rust","readme":"# ledger-utils\n\n[![Crates.io Version](https://img.shields.io/crates/v/ledger-utils.svg)](https://crates.io/crates/ledger-utils)\n[![Docs.rs Version](https://docs.rs/ledger-utils/badge.svg)](https://docs.rs/ledger-utils)\n[![License Unlicense](https://img.shields.io/crates/l/ledger-utils.svg)](http://unlicense.org/UNLICENSE)\n\n[Ledger-cli](https://www.ledger-cli.org/) file processing Rust library, useful for calculating balances, creating reports etc.\n\n```rust\nuse anyhow::{bail, Result};\nuse ledger_utils::{balance::Balance, Ledger};\n\nfn main() -\u003e Result\u003c()\u003e {\n    let ledger: Ledger = fs::read_to_string(\"finances.ledger\")?.parse()?;\n\n    if ledger.transactions.is_empty() {\n        bail!(\"no transactions found\");\n    }\n\n    let balance: Balance = (\u0026ledger).into();\n\n    let mut assets: Vec\u003c_\u003e = balance\n        .account_balances\n        .iter()\n        .filter(|(name, _)| name.starts_with(\"Assets:\"))\n        .collect();\n    assets.sort_by_key(|\u0026(name, _)| name);\n    for (name, balance) in assets {\n        println!(\"{}: {}\", name, balance);\n    }\n\n    Ok(())\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarek-g%2Frust-ledger-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarek-g%2Frust-ledger-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarek-g%2Frust-ledger-utils/lists"}