{"id":16729950,"url":"https://github.com/jrwrigh/csv2cash","last_synced_at":"2025-04-10T11:12:56.732Z","repository":{"id":139721233,"uuid":"136085753","full_name":"jrwrigh/csv2cash","owner":"jrwrigh","description":"Python package for importing CSV files to GNUCash","archived":false,"fork":false,"pushed_at":"2023-01-21T17:34:40.000Z","size":107,"stargazers_count":24,"open_issues_count":5,"forks_count":7,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-24T10:05:31.591Z","etag":null,"topics":["csv-parser","gnucash","python3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jrwrigh.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"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":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-06-04T21:38:12.000Z","updated_at":"2025-02-27T17:41:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"c7c9e13d-402d-4a93-bdf3-a2d82057ae3f","html_url":"https://github.com/jrwrigh/csv2cash","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrwrigh%2Fcsv2cash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrwrigh%2Fcsv2cash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrwrigh%2Fcsv2cash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrwrigh%2Fcsv2cash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jrwrigh","download_url":"https://codeload.github.com/jrwrigh/csv2cash/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248208565,"owners_count":21065202,"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":["csv-parser","gnucash","python3"],"created_at":"2024-10-12T23:30:55.737Z","updated_at":"2025-04-10T11:12:56.719Z","avatar_url":"https://github.com/jrwrigh.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003ecsv2cash\u003c/h1\u003e\n\u003cp align=\"center\"\u003e\u003cstrong\u003ePython package for importing CSV files to GNUCash with some preprocessing built in.\u003c/strong\u003e\u003c/p\u003e\n\n[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://github.com/u2berggeist/csv2cash/graphs/commit-activity)\n\n#### Having issues or an idea for improvement? [Make an issue!](https://github.com/u2berggeist/csv2cash/issues)\n\n## What does it do?\n\n### It takes your raw *transfer* data and compiles it into *transactions*\n\nA transfer is simply half of a transaction in [double-entry\nbookkeeping](https://en.wikipedia.org/wiki/Double-entry_bookkeeping_system)\n([which GNUCash uses](https://www.gnucash.org/features.phtml#main-feat)). So if\nyou move money from Bank Account A to Bank Account B, then you have two\ntransfer records, one for each Account. One from Bank Account A saying $XXX\nmoney was withdrawn and one from Bank Account B saying $XXX money was\ndeposited. In GNUCash, though, these two transfers are viewed as a single\ntransaction: $XXX was moved from Bank Account A --\u003e Bank Account B.\n\nIn Mint for example, if you export a CSV of all your transfer data, it will\nkeep each transfer separate from the other, even though they are directly\nrelated and should be viewed as a single transaction. This package finds the\nseparate transfers, figures out which ones correspond to each other, and puts\ntheir data together\n\n### Translates your CSV categories into a GNUCash account \n\nSay your CSV has a category system attached to each transfer and you want \nthat organization to be transferred into Mint without having to go one-by-one\nthrough every transfer and label them. This will do that by setting up the \n`translation.json` dictionary, which will take a transfer that is under a given\ncategory, and place it in the corresponding GNUCash account.\n\nUse the `get_uncat_transfers` function to view any transactions that haven't\nbeen categorized. This can be useful to determine what translations you still\nneed to add to `translations.json`. You can also use `write_account_list` to\ncreate a text file of all the accounts in a GNUCash book, this way you don't\nhave to keep your GNUCash book open the whole time!\n\n## Requirements\n\n- pandas\n- piecash (see [note](#note) below about versioning)\n- Verified for Python 3.6, though should work for other versions\n\n#### Recommended\n\n- [dfgui](https://github.com/bluenote10/PandasDataFrameGUI) for pandas DataFrame visualization\n\n# Instructions:\n\nSee examples in `./example` for how to use the module effectively.\n\n## Structure:\n\nThe module takes data from a .csv file, translates information (such as\ncategory and account names) by referencing the `translations.json` dictionary,\ncombines internal transfers (ie. moving money from savings account to checking\naccount), and puts the translated data into the GNUCash Book of your choosing.\n\n## How to Use?:\n\n### 1. Create your `translations.json`\n\nThis stores the information that will be translated from your csv to the\nGNUCash book. If a key:value pair does not match up with a category or account\nname in the csv, it will be placed into an \"Uncategorized\" setting.\n\n### Pre-2. Run `get_compiled_transactions`\n\nI recommend doing this to make sure that all the transactions look ok. I\nrecommend using `dfgui` as a way to view the DataFrames to make sure everything\nis looking right.\n\n### 2. Run `do_csv2cash`!\n\nThis function will do all the work and edit your GNUCash book. If you want to,\nyou can go step-by-step by using the individual commands at each step. \n\n## About `translations.json`:\n\n### Format:\n\nThe `translations.json` file has two dictionaries called \"Categories\" and\n\"Accounts\" that stores translations for category names and account names,\nrespectively.\n\nThe \"key\" in each key:value pair is the string that will match the csv, while\nthe \"value\" is the string that matches the name in the GNUCash Book.\n\nIf the \"value\" is set to `\"IGNORE\"`, then that transfer (the row of the csv)\nwill be ignored and will not be passed through to the rest of the functions.\n\nBelow is an example of a `translations.json` file:\n\n```json\n{\n    \"Categories\":{\n        \"Mortgage \u0026 Rent\" : \"Rent\",\n        \"Sporting Goods\" : \"Hobbies\",\n        \"Music\" : \"Music/Movies\",\n        \"Uncategorized\" : \"Uncategorized\",\n        \"Unwanted Transfers\" : \"IGNORE\"\n    },\n    \"Accounts\":{\n        \"BofA Core Checking\" : \"Checking Account\",\n        \"Regular Savings\" : \"Savings Account\",\n        \"Cash\" : \"Cash in Wallet\",\n        \"Roth Contributory IRA\" : \"Market Index\",\n        \"Uncategorized\" : \"Uncategorized\"\n    }\n}\n```\n\n### Creating\n\nA few tools have been created in order to assist with the creation of the\n`translations.json` file. They are `get_uncat_transfers` and\n`write_account_list`. \n\n`get_uncat_transfers` will return a pandas DataFrame will all the transfers\nwho's modified category name is \"Uncategorized\" (which is the default if no\napplicable key:value pair is given). This can be viewed using `dfgui` to see\nwhat transfers still need translations. `dfgui` also has several helpful\nsorting features built-in.\n\n`write_account_list` writes a text file with the account fullnames (see\n`piecash` documentation for account fullname definition) of the GNUCash Book\nspecified. This gives a simple way to view what options you have to translate\nyour transfers to.\n\n## Note:\n\n~Currently requires the use of a development version of `piecash` to work with\nGNUCash 3.X. You can install the new version currently (2018-06-18) through\npip:~\n\n~`pip install git+https://github.com/sdementen/piecash.git@feature/py3-gnucash3`~\n\n`piecash` has now merged the feature branch into it's master branch under\nversion 1.0.0. If anyone can use this version and verify that it works, please\nlet me know in [issue #17](https://github.com/jrwrigh/csv2cash/issues/17).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjrwrigh%2Fcsv2cash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjrwrigh%2Fcsv2cash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjrwrigh%2Fcsv2cash/lists"}