<commit_before># csv2qif

Perl script for converting [CSV](https://en.wikipedia.org/wiki/Comma-separated_values)
to [QIF](https://en.wikipedia.org/wiki/Quicken_Interchange_Format).

## Requirements

Modern version of Perl 5, minimum 5.14 (whatever is in Debian oldstable is
considered the minimum).

## Usage

The script takes CSV data from standard input and produces QIF data on standard
output. To convert a file `statement.csv` to `statement.qif` you will need to
run the following command:

```
cat statement.csv | perl ./csv2qif.pl > statement.qif
```

### Command line options

`csv2qif` requires a configuration file which specifies which fields in the CSV
file correspond to the relevant QIF fields. The important column names are:
`date`, `description`, `debit` and `credit`. Other columns must be specified
but their names do not affect the conversion process.

Column mappings must be placed on a single line in a plain text field, with
column headings separated by whitespace. See `config/co-op-business.txt` for
an example.

The relevant configuration file can be selected using the `--config` option,
which is required.

If your CSV file includes headers (assumed to be on line 1) then you need to
specify the `--skip-headers` argument, otherwise `csv2qif` will try to process
the headers as a transaction.

## Bug reports

Bugs should be reported via the GitHub issue system. Pull requests are welcome,
either for code or new heading mappings for other banks.

The fact that the script may not work correctly on older versions of Perl is
not considered a bug.
<commit_msg>Tweak example to use new command line options<commit_after># csv2qif

Perl script for converting [CSV](https://en.wikipedia.org/wiki/Comma-separated_values)
to [QIF](https://en.wikipedia.org/wiki/Quicken_Interchange_Format).

## Requirements

Modern version of Perl 5, minimum 5.14 (whatever is in Debian oldstable is
considered the minimum).

## Usage

The script takes CSV data from standard input and produces QIF data on standard
output. To convert a file `statement.csv` to `statement.qif` from a Co-op
Business Account you will need to run the following command:

```
cat statement.csv | perl ./csv2qif.pl --skip-headers --config files/co-op-business.txt > statement.qif
```

### Command line options

`csv2qif` requires a configuration file which specifies which fields in the CSV
file correspond to the relevant QIF fields. The important column names are:
`date`, `description`, `debit` and `credit`. Other columns must be specified
but their names do not affect the conversion process.

Column mappings must be placed on a single line in a plain text field, with
column headings separated by whitespace. See `config/co-op-business.txt` for
an example.

The relevant configuration file can be selected using the `--config` option,
which is required.

If your CSV file includes headers (assumed to be on line 1) then you need to
specify the `--skip-headers` argument, otherwise `csv2qif` will try to process
the headers as a transaction.

## Bug reports

Bugs should be reported via the GitHub issue system. Pull requests are welcome,
either for code or new heading mappings for other banks.

The fact that the script may not work correctly on older versions of Perl is
not considered a bug.

{'fraction_non_alphanumeric': 0.06936416184971098, 'fraction_numerical': 0.005476118040766657, 'mean_word_length': 4.48, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6281081', 'n_tokens_mistral': 922, 'n_tokens_neox': 866, 'n_words': 459}