{"id":26449120,"url":"https://github.com/rylorin/csv2ofx","last_synced_at":"2025-07-28T20:09:33.577Z","repository":{"id":281986732,"uuid":"946217054","full_name":"rylorin/csv2ofx","owner":"rylorin","description":"Convert CSV files to OFX file format","archived":false,"fork":false,"pushed_at":"2025-07-08T13:55:42.000Z","size":170,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-08T14:48:34.437Z","etag":null,"topics":["csv","gnucash","ofx"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rylorin.png","metadata":{"files":{"readme":"README.md","changelog":null,"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,"zenodo":null}},"created_at":"2025-03-10T19:49:11.000Z","updated_at":"2025-07-08T13:55:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"cf7cbef5-9d33-4272-b2df-3271287ffa1f","html_url":"https://github.com/rylorin/csv2ofx","commit_stats":null,"previous_names":["rylorin/csv2ofx"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rylorin/csv2ofx","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rylorin%2Fcsv2ofx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rylorin%2Fcsv2ofx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rylorin%2Fcsv2ofx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rylorin%2Fcsv2ofx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rylorin","download_url":"https://codeload.github.com/rylorin/csv2ofx/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rylorin%2Fcsv2ofx/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267578003,"owners_count":24110351,"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-07-28T02:00:09.689Z","response_time":68,"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":["csv","gnucash","ofx"],"created_at":"2025-03-18T14:51:36.124Z","updated_at":"2025-07-28T20:09:33.572Z","avatar_url":"https://github.com/rylorin.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# csv2ofx\n\n## Overview\n\n`csv2ofx` is a tool that converts CSV files to OFX format. This is useful for importing financial data into accounting software that supports `OFX` files, like `GnuCash`.\n\n## Features\n\n- Convert CSV files to OFX format\n- Support for multiple CSV formats through configuration\n- Filter transactions by account and date\n- Support for labels and memos\n- Automatic reference generation\n- Configurable date formats and delimiters\n\n## Installation\n\nTo install `csv2ofx`, you can use check it out from GitHub:\n\n```sh\ngit clone rylorin/csv2ofx\ncd csv2ofx\nyarn install\nyarn build\n```\n\n## Configuration\n\n`csv2ofx` uses a configuration file to define how to parse CSV files and generate OFX output. The configuration is stored in JSON format and supports multiple models for different CSV formats.\n\n### Configuration Structure\n\n```json\n{\n  \"account\": \"my-account\",\n  \"from_date\": \"2001-01-01\"\n  \"accounts\": {\n    \"my-account\": {\n      \"acct_id\": \"123456789\",\n      \"bank_id\": \"BANK12345\",\n      \"currency\": \"EUR\"\n    }\n  },\n  \"models\": {\n    \"my-model\": {\n      \"encoding\": \"utf-8\",\n      \"delimiter\": \";\",\n      \"dateFormat\": \"dd/MM/yyyy\",\n      \"fromLine\": 2,\n      \"toLine\": 1000,\n      \"columns\": {\n        \"date\": 1,\n        \"payee\": 2,\n        \"category\": 3,\n        \"amount\": 4,\n        \"memo\": 5,\n        \"label\": 6,\n        \"reference\": 7,\n        \"account\": 8\n      }\n    }\n  }\n}\n```\n\n### Configuration Options\n\n#### Run Configuration\n\n- `account`: The account identifier to filter transactions\n- `from_date`: Optional start date for filtering transactions (ISO format)\n\n#### Account Configuration\n\n- `accounts.{accountId}.acct_id`: The account identifier for the account\n- `accounts.{accountId}.bank_id`: The bank identifier for the account\n- `accounts.{accountId}.currency`: The currency code (e.g., EUR, USD)\n\n#### Model Configuration\n\n- `models.{modelName}.encoding`: File encoding (e.g., utf-8, latin1)\n- `models.{modelName}.delimiter`: CSV delimiter character\n- `models.{modelName}.date_format`: Date format using Luxon format tokens\n- `models.{modelName}.from_line`: First line to process (1-based)\n- `models.{modelName}.to_line`: Last line to process (1-based)\n- `models.{modelName}.columns`: Column mapping configuration\n\n#### Column Configuration\n\n- `columns.date`: Column index for the date field (1-based)\n- `columns.payee`: Column index for the payee field (1-based)\n- `columns.category`: Column index for the category field (1-based)\n- `columns.amount`: Column index for the amount field (1-based)\n- `columns.memo`: Optional column index for the memo field (1-based)\n- `columns.label`: Optional column index for the label field (1-based)\n- `columns.reference`: Optional column index for the reference field (1-based)\n- `columns.account`: Column index for the account field (1-based)\n\n### Example Configurations\n\n#### Basic Configuration\n\n```json\n{\n  \"account\": \"checking\"\n  \"accounts\": {\n    \"checking\": {\n      \"bank_id\": \"123456789\",\n      \"currency\": \"EUR\"\n    }\n  },\n  \"models\": {\n    \"default\": {\n      \"encoding\": \"utf-8\",\n      \"delimiter\": \",\",\n      \"date_format\": \"yyyy-MM-dd\",\n      \"from_line\": 2,\n      \"columns\": {\n        \"date\": 1,\n        \"payee\": 2,\n        \"category\": 3,\n        \"amount\": 4,\n        \"account\": 5\n      }\n    }\n  }\n}\n```\n\n#### Advanced Configuration\n\n```json\n{\n  \"account\": \"savings\",\n  \"from_date\": \"2024-01-01\",\n  \"accounts\": {\n    \"savings\": {\n      \"bank_id\": \"987654321\",\n      \"currency\": \"USD\"\n    }\n  },\n  \"models\": {\n    \"bank-export\": {\n      \"encoding\": \"latin1\",\n      \"delimiter\": \";\",\n      \"date_format\": \"dd.MM.yyyy\",\n      \"from_line\": 2,\n      \"to_line\": 1000,\n      \"columns\": {\n        \"date\": 1,\n        \"payee\": 2,\n        \"category\": 3,\n        \"amount\": 4,\n        \"memo\": 5,\n        \"label\": 6,\n        \"reference\": 7,\n        \"account\": 8\n      }\n    }\n  }\n}\n```\n\n## Usage\n\n### Basic Usage\n\n```sh\ncsv2ofx model input.csv output.ofx\n```\n\n### Examples\n\n1. Convert a CSV file using the default model:\n\n```sh\ncsv2ofx default transactions.csv output.ofx\n```\n\n2. Convert a CSV file using a specific model:\n\n```sh\ncsv2ofx bank-export bank_data.csv output.ofx\n```\n\n3. Convert a CSV file and filter by date:\n\n```sh\ncsv2ofx default transactions.csv output.ofx --from-date 2024-01-01\n```\n\n4. Convert a CSV file and filter by account:\n\n```sh\ncsv2ofx default transactions.csv output.ofx --account savings\n```\n\n## CSV Format\n\nThe CSV file should contain the following columns (order can be configured):\n\n1. Date (in the format specified in the configuration)\n2. Payee\n3. Category\n4. Amount (positive for credits, negative for debits)\n5. Optional: Memo\n6. Optional: Labels (comma-separated)\n7. Optional: Reference\n8. Optional: Account\n\nExample CSV:\n\n```csv\ndate,payee,category,amount,memo,label,reference,account\n2024-01-01,Supermarket,Groceries,-50.00,Weekly shopping,food,REF123,checking\n2024-01-02,Salary,Income,2000.00,January salary,income,REF124,checking\n```\n\n## OFX Output\n\nThe generated OFX file will include:\n\n- Account information\n- Transaction list with dates, amounts, and references\n- Memos combining category and labels\n- Final balance\n\n## Contributing\n\nContributions are welcome! Please fork the repository and submit a pull request.\n\n## License\n\nThis project is licensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frylorin%2Fcsv2ofx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frylorin%2Fcsv2ofx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frylorin%2Fcsv2ofx/lists"}