Skip to content

StephenBrown2/merge-account-number-name

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CSV: Merge Account Number and Holder

This small Go program reads a CSV file with ; as the delimiter and merges the columns Tegenrekeningnummer (counter account number) and Tegenrekeninghouder (counter account holder) into a single column Tegenrekening. All other columns are preserved, and the output is written to a new file with the suffix _samengevoegde_rekeninghouder (Dutch for "merged account holder").

Intended Use Case

This script is designed to help you modify bank transaction exports in preparation for importing them into Actual Budget. After running this script, you will need to import the resulting file into Actual Budget yourself. This script does not perform the import into Actual Budget; it only prepares the data.

Downloading a Pre-built Binary

If you are not familiar with Go, you can simply download the correct binary for your operating system from the GitHub repository's Releases page:

  1. Go to the Releases section of the repository on GitHub.
  2. Download the file that matches your operating system:
    • Windows: merge-account-number-name-windows-amd64.exe or merge-account-number-name-windows-arm64.exe
    • macOS: merge-account-number-name-darwin-amd64 or merge-account-number-name-darwin-arm64
    • Linux: merge-account-number-name-linux-amd64 or merge-account-number-name-linux-arm64
  3. Place the file somewhere convenient (e.g., your Desktop or Documents folder).
  4. Open a terminal (or Command Prompt on Windows), navigate to the folder, and run:
    • On Windows:

      merge-account-number-name-windows-amd64.exe --in yourfile.csv
    • On macOS/Linux:

      ./merge-account-number-name-linux-amd64 --in yourfile.csv
      # or for macOS
      ./merge-account-number-name-darwin-amd64 --in yourfile.csv

No Go installation is required for this method.

Cross-compiling Binaries for All Platforms

Use the existing script build-all.sh in the repository to build binaries for Windows, macOS, and Linux (amd64/arm64). It outputs all artifacts into the top-level dist/ folder.

Usage (it may already be executable; if not, run chmod first):

chmod +x build-all.sh
./build-all.sh

The built files will appear in dist/.

To install globally (requires Go 1.25+):

go install github.com/StephenBrown2/merge-account-number-name@latest

Building Locally

To build a local binary in the current directory:

go build

Usage

  • Requirement: Go 1.25+

Run the program with:

go run . --in path/to/file.csv

Optionally, you can choose a custom delimiter and/or specify an explicit output path:

go run . --in path/to/file.csv --out path/to/file_samengevoegde_rekeninghouder.csv --delim ';'

Behavior

  • Expects column names: Tegenrekeningnummer and Tegenrekeninghouder in the header.
  • The new column Tegenrekening appears in the position of Tegenrekeningnummer and Tegenrekeninghouder is removed.
  • The merged value is: <Tegenrekeningnummer> <space> <Tegenrekeninghouder>. Empty parts are automatically trimmed.
  • Input and output use ; as the delimiter by default. This can be changed with --delim.
  • Errors and messages are in Dutch.

Example

Input (header shortened):

...;Tegenrekeningnummer;Tegenrekeninghouder;...
...;NL12TEST08273723;CCV*TestExampleName;...

Output (header shortened):

...;Tegenrekening;...
...;NL12TEST08273723 CCV*TestExampleName;...

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •