{"id":19224089,"url":"https://github.com/pedroalbanese/ledger","last_synced_at":"2025-04-20T23:32:01.519Z","repository":{"id":57635377,"uuid":"367458979","full_name":"pedroalbanese/ledger","owner":"pedroalbanese","description":"Pure Go command line double-entry accounting program","archived":false,"fork":false,"pushed_at":"2023-07-23T22:34:58.000Z","size":2761,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-01T06:51:44.308Z","etag":null,"topics":["accounting","go","golang","ledger","plaintext","plaintext-accounting"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pedroalbanese.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2021-05-14T19:16:49.000Z","updated_at":"2024-01-18T05:27:11.000Z","dependencies_parsed_at":"2024-06-20T03:24:15.911Z","dependency_job_id":null,"html_url":"https://github.com/pedroalbanese/ledger","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pedroalbanese%2Fledger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pedroalbanese%2Fledger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pedroalbanese%2Fledger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pedroalbanese%2Fledger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pedroalbanese","download_url":"https://codeload.github.com/pedroalbanese/ledger/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249977433,"owners_count":21354859,"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":["accounting","go","golang","ledger","plaintext","plaintext-accounting"],"created_at":"2024-11-09T15:10:30.723Z","updated_at":"2025-04-20T23:32:01.118Z","avatar_url":"https://github.com/pedroalbanese.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ledger\n[![ISC License](http://img.shields.io/badge/license-ISC-blue.svg)](https://github.com/pedroalbanese/ledger/blob/master/LICENSE.md) \n[![GoDoc](https://godoc.org/github.com/pedroalbanese/ledger?status.png)](http://godoc.org/github.com/pedroalbanese/ledger)\n[![GitHub downloads](https://img.shields.io/github/downloads/pedroalbanese/ledger/total.svg?logo=github\u0026logoColor=white)](https://github.com/pedroalbanese/ledger/releases)\n[![Go Report Card](https://goreportcard.com/badge/github.com/pedroalbanese/ledger)](https://goreportcard.com/report/github.com/pedroalbanese/ledger)\n[![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/pedroalbanese/ledger)](https://golang.org)\n[![GitHub release (latest by date)](https://img.shields.io/github/v/release/pedroalbanese/ledger)](https://github.com/pedroalbanese/ledger/releases)\n\nThis is a project to parse and import transactions in a ledger file similar\nto the [Ledger](http://ledger-cli.org) command line tool written in C++.\n\n## Simple Ledger file support\n\nThe ledger file this will parse is much simpler than the C++ tool.\n\nTransaction Format:\n\n    \u003cYYYY/MM/dd\u003e \u003cPayee description\u003e\n        \u003cAccount Name 1\u003e    \u003cAmount 1\u003e\n        .\n        .\n        .\n        \u003cAccount Name N\u003e    \u003cAmount N\u003e\n \nThe transaction must balance (the positive amounts must equal negative amounts).\nOne of the account lines is allowed to have no amount. The amount necessary\nto balance the transaction will be added to that account for the transaction.\nAmounts must be decimal numbers with a negative(-) sign in front if necessary.\n\nExample transaction:\n\n    2013/01/02 McDonald's #24233 HOUSTON TX\n        Expenses:Dining Out:Fast Food        5.60\n        Wallet:Cash\n\nA ledger file is a list of transactions separated by a blank line.\n\nA ledger file may include other ledger files using `include \u003cfilepath\u003e`. The\n`filepath` is relative to the including file.\n\n\n## ledger\n\nThis will parse a ledger file into an array of Transaction structs.\nThere is also a function get balances for all accounts in the ledger file.\n\n[GoDoc](https://pkg.go.dev/github.com/pedroalbanese/ledger)\n\n## cmd/ledger\n\nA very simplistic version of Ledger.\nSupports \"balance\", \"register\", \"print\" and \"stats\" commands.\n\nExample usage:\n```sh\n    ledger -f ledger.dat bal\n    ledger -f ledger.dat bal Cash\n    ledger -f ledger.dat reg\n    ledger -f ledger.dat reg Food\n    ledger -f ledger.dat print\n    ledger -f ledger.dat stats\n```\n\n## cmd/limport\n\nUsing an existing ledger as input to a bayesian classifier, it will attempt to\nclassify an imported csv of transactions based on payee names and print them in\na ledger file format. \n\nAttempts to get payee, date, and amount based on headers in the csv file.\n\nExample usage:\n```sh\n    limport -f ledger.dat discover discover-recent-transactions.csv\n```\n\nIn the above example \"discover\" is the account search string to use to find\nthe account that all transactions in the csv file should be applied too. The\nsecond account to use for each transaction will be picked based on the\nbayesian classification of the payee.\n\n## Incompatibilities\n\n- C++ Ledger permits having amounts prefixed with $; Ledger in Go does not\n\n- C++ Ledger permits an empty *Payee Description*; Ledger in Go does not\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpedroalbanese%2Fledger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpedroalbanese%2Fledger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpedroalbanese%2Fledger/lists"}