Skip to main content

Spanish banks' CSB norm 43 converter to OFX and Homebank

Project description

English

Tools for converting from the Spanish banks’ format CSB norm 43 (CSB43).

csb2ofx

File converter from the CSB43 to OFX format.

Usage:

$ csb2ofx --help
usage: csb2ofx [-h] [-s] [-df] [-d DECIMAL] [csbFile] [ofxFile]


Convert a CSB43 file to a OFX file

positional arguments:
csbFile               a csb43 file (stdin by default)
ofxFile               name for output file (stdout by default)

optional arguments:
-h, --help            show this help message and exit
-s, --strict          strict mode
-df, --dayfirst       use DDMMYY as date format while parsing the csb43 file
                        instead of YYMMDD
-d DECIMAL, --decimal DECIMAL
                        set the number of decimal places for the currency type
                        (default: 2)

From one file to another

$ csb2ofx transactions.csb transactions.ofx

or

$ csb2ofx transactions.csb > transactions.ofx

From another app to file

$ get_my_CSB_transactions | csb2ofx > transactions.ofx

csb2homebank

File converter from the CSB43 to HomeBank CSV format.

Usage:

$ csb2homebank
usage: csb2homebank [-h] [-s] [-df] [-d DECIMAL] [csbFile] [hbFile]

Convert a CSB43 file to a HomeBank CSV file

positional arguments:
csbFile               a csb43 file (stdin by default)
hbFile                name for output file (stdout by default

optional arguments:
-h, --help            show this help message and exit
-s, --strict          strict mode
-df, --dayfirst       use DDMMYY as date format while parsing the csb43 file
                        instead of YYMMDD
-d DECIMAL, --decimal DECIMAL
                        set the number of decimal places for the currency type
                        (default: 2)

From one file to another

$ csb2homebank transactions.csb transactions.csv

or

$ csb2homebank transactions.csb > transactions.csv

From another app to file

$ get_my_CSB_transactions | csb2homebank > transactions.csv

Using Python

Parse a CSB43 file and print the equivalent OFX file

:::python

# OFX
from csb43 import csb_43, ofx

csbFile = csb_43.File(open("movimientos.csb"), strict=False)

# print to stdout
print ofx.convertFromCsb(csbFile)

Parse a CSB43 file and print the equivalent HomeBank CSV file

:::python

# OFX
from csb43 import csb_43, homebank

csbFile = csb_43.File(open("movimientos.csb"), strict=False)

# print to stdout
for line in homebank.convertFromCsb(csbFile):
    print line

Español

Herramientas para convertir ficheros en formato usado por múltiples bancos españoles (norma 43 del Consejo Superior Bancario [CSB43]) a otros formatos.

csb2ofx

Conversor de archivo en CSB43 a OFX.

Uso:

$ csb2ofx --help
usage: csb2ofx [-h] [-s] [-df] [-d DECIMAL] [csbFile] [ofxFile]


Convert a CSB43 file to a OFX file

positional arguments:
csbFile               a csb43 file (stdin by default)
ofxFile               name for output file (stdout by default)

optional arguments:
-h, --help            show this help message and exit
-s, --strict          strict mode
-df, --dayfirst       use DDMMYY as date format while parsing the csb43 file
                        instead of YYMMDD
-d DECIMAL, --decimal DECIMAL
                        set the number of decimal places for the currency type
                        (default: 2)

De un archivo a otro

$ csb2ofx transactions.csb transactions.ofx

o bien

$ csb2ofx transactions.csb > transactions.ofx

Desde entrada estándar (otra aplicación) a archivo

$ get_my_CSB_transactions | csb2ofx > transactions.ofx

csb2homebank

Conversor de archivo de CSB43 al formato CSV de HomeBank.

Uso:

$ csb2homebank
usage: csb2homebank [-h] [-s] [-df] [-d DECIMAL] [csbFile] [hbFile]

Convert a CSB43 file to a HomeBank CSV file

positional arguments:
csbFile               a csb43 file (stdin by default)
hbFile                name for output file (stdout by default

optional arguments:
-h, --help            show this help message and exit
-s, --strict          strict mode
-df, --dayfirst       use DDMMYY as date format while parsing the csb43 file
                        instead of YYMMDD
-d DECIMAL, --decimal DECIMAL
                        set the number of decimal places for the currency type
                        (default: 2)

De un archivo a otro

$ csb2homebank transactions.csb transactions.csv

o bien

$ csb2homebank transactions.csb > transactions.csv

Desde entrada estándar (otra aplicación) a archivo

$ get_my_CSB_transactions | csb2homebank > transactions.csv

En Python

Lee un archivo CSB43 e imprime el contenido equivalente en OFX

:::python

# OFX
from csb43 import csb_43, ofx

csbFile = csb_43.File(open("movimientos.csb"), strict=False)

# imprime a stdout
print ofx.convertFromCsb(csbFile)

Lee un archivo CSB e imprime el contenido equivalente a CSV de Homebank

:::python

# OFX
from csb43 import csb_43, homebank

csbFile = csb_43.File(open("movimientos.csb"), strict=False)

# imprime a stdout
for line in homebank.convertFromCsb(csbFile):
    print line

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

csb43-0.1.tar.gz (22.2 kB view details)

Uploaded Source

File details

Details for the file csb43-0.1.tar.gz.

File metadata

  • Download URL: csb43-0.1.tar.gz
  • Upload date:
  • Size: 22.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for csb43-0.1.tar.gz
Algorithm Hash digest
SHA256 0fc075b8d0decd5781f610b2639865352b5cbe5d9b1edda0583851e4bcaa4139
MD5 520b29d288d25b83da207fa664964024
BLAKE2b-256 1ce35818b1a6380db70f3c7bdc93a1b584eec61e970a520bbde05156dcce4bb7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page