{"id":24995323,"url":"https://github.com/launchplatform/beanhub-import-demo","last_synced_at":"2026-02-27T19:47:18.376Z","repository":{"id":239069892,"uuid":"798417814","full_name":"LaunchPlatform/beanhub-import-demo","owner":"LaunchPlatform","description":"Demo for beanhub-import","archived":false,"fork":false,"pushed_at":"2025-03-08T07:22:39.000Z","size":1246,"stargazers_count":2,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-25T23:41:45.621Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Nix","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/LaunchPlatform.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2024-05-09T18:27:22.000Z","updated_at":"2025-03-08T07:22:42.000Z","dependencies_parsed_at":"2024-09-09T12:02:10.096Z","dependency_job_id":null,"html_url":"https://github.com/LaunchPlatform/beanhub-import-demo","commit_stats":null,"previous_names":["launchplatform/beanhub-import-demo"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LaunchPlatform%2Fbeanhub-import-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LaunchPlatform%2Fbeanhub-import-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LaunchPlatform%2Fbeanhub-import-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LaunchPlatform%2Fbeanhub-import-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LaunchPlatform","download_url":"https://codeload.github.com/LaunchPlatform/beanhub-import-demo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248514221,"owners_count":21116903,"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":"2025-02-04T15:35:11.698Z","updated_at":"2026-02-27T19:47:18.311Z","avatar_url":"https://github.com/LaunchPlatform.png","language":"Nix","funding_links":[],"categories":[],"sub_categories":[],"readme":"# beanhub-import-demo\nThis is a demo repository meant to showcase [beanhub-import](https://github.com/LaunchPlatform/beanhub-import). To kick start, you need to install dependencies first with poetry:\n\n```bash\npoetry install\n```\n\nOr, if you prefer using nixpkgs, you can also run:\n\n```bash\nnix develop\n```\n\nThe above step shall install [beanhub-cli](https://github.com/LaunchPlatform/beanhub-cli) for you.\nYou can run the following command in the poetry environment:\n\n```bash\npoetry run bh import\n```\n\nOr use `bh` command directly if you are using Nix:\n\n```bash\nbh import\n```\n\nYou can then run \n\n```bash\ngit diff\n```\n\nTo see the new transactions imported by beanhub-import.\nSince our `books/2024.bean` only contains imported transactions before a certain day in 2024, by doing so should give you the new transactions after the day from the CSV file like this:\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/LaunchPlatform/beanhub-import-demo/raw/master/assets/new-txns.png?raw=true\" alt=\"Git diff screenshot showing new Beancount transactions added to the books/2024.bean file\" /\u003e\n\u003c/p\u003e\n\nNow, you can also modify the beanhub-import file at `.beanhub/imports.yaml` and run the import command again to see how it magically updates and moves all the imported transactions for you.\nFor example, say you want to import files into different quarter files instead of years.\nYou can then change the `default_file` value like this:\n\n```\nbooks/{{ date.year }}Q{{ ((date.month - 1) // 3) + 1  }}.bean\n```\n\nAnd the git diff looks like this:\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/LaunchPlatform/beanhub-import-demo/raw/master/assets/quater-output-file.png?raw=true\" alt=\"Git diff screenshot showing default_file changed to output quater file names instead of just year\" /\u003e\n\u003c/p\u003e\n\nThen run the import command again, and you will see it automatically remove the transactions from the `2024.bean` file, then create and insert those transactions to `2024Q1.bean` and `2024Q2.bean` instead.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/LaunchPlatform/beanhub-import-demo/raw/master/assets/auto-txn-migration.png?raw=true\" alt=\"Git diff screenshot showing Beancount transactions removed from the books/2024.bean file and new quater beancount files added\" /\u003e\n\u003c/p\u003e\n\nAnother example is when you want to add new tags to the imported transactions for expenses. You can modify the import file with a new tags field in the transaction template:\n\n```YAML\ntags:\n  - BeanHubImportIsAwesome\n```\n\nAnd the git diff looks like this:\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/LaunchPlatform/beanhub-import-demo/raw/master/assets/new-tags.png?raw=true\" alt=\"Git diff screenshot showing new line\" /\u003e\n\u003c/p\u003e\n\nThen, run the import command again. And here you go!\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/LaunchPlatform/beanhub-import-demo/raw/master/assets/new-tags-result.png?raw=true\" alt=\"Git diff screenshot showing new tags added to all imported Beancount transactions\" /\u003e\n\u003c/p\u003e\n\nIt's all declarative and idempotent.\nWith beanhub-import, you say goodbye to manually importing and maintaining transactions!\nI hope you like this tool.\nIt's still in the early stage of development.\nWe are also working on making generating transactions from multiple sources possible.\nPlease feel free to open issues in the [beanhub-import](https://github.com/LaunchPlatform/beanhub-import) repository if you have any feedback 🙌\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaunchplatform%2Fbeanhub-import-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flaunchplatform%2Fbeanhub-import-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaunchplatform%2Fbeanhub-import-demo/lists"}