File: PKG-INFO

package info (click to toggle)
python-csb43 0.9.2%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 560 kB
  • sloc: python: 6,233; sh: 9; makefile: 6
file content (584 lines) | stat: -rw-r--r-- 18,313 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
Metadata-Version: 2.1
Name: csb43
Version: 0.9.2
Summary: Spanish banks' CSB norm 43 converter to OFX, Homebank, json, yaml, xls, xlsx, ods, csv, tsv
Home-page: https://bitbucket.org/wmj/csb43
Author: wmj
Author-email: wmj.py@gmx.com
License: LGPL
Project-URL: Bug Reports, https://bitbucket.org/wmj/csb43/issues
Project-URL: Source, https://bitbucket.org/wmj/csb43
Description: csb43
        =====
        
        
        Español
        -------
        
        Herramientas para convertir ficheros en formato usado por múltiples
        bancos españoles (**norma 43 del Consejo Superior Bancario** [*CSB43*]
        / **Asociación Española de Banca** [*AEB43*]) a otros formatos.
        
        
        csb2format
        ~~~~~~~~~~
        
        Conversor de ficheros en **CSB/AEB norma 43** a otros formatos.
        
        Formatos soportados:
        
        -  `OFX XML <http://www.ofx.net>`_ v1.0.3 & v2.1.1
        -  `HomeBank CSV <http://homebank.free.fr/help/06csvformat.html>`_
        -  *HTML*
        -  *JSON*
        -  *ODS*: hoja de cálculo OpenDocument
        -  *CSV*, *TSV*: valores separados por coma o tabulador
        -  *XLS*: hoja de cálculo de Microsoft Excel
        -  *XLSX*: hoja de cálculo OOXML
        -  *YAML*
        
        
        Instalación:
        ^^^^^^^^^^^^
        
        Todos los formatos disponibles:
        
        ::
        
            pip install csb43[all]
        
        
        Formatos internos (ofx, ofx1, homebank) más YAML:
        
        ::
        
            pip install csb43[yaml]
        
        
        Formatos internos (ofx, ofx1, homebank) más formatos del paquete `tablib`:
        
        ::
        
            pip install csb43[formats]
        
        
        Opciones:
        ^^^^^^^^^
        
        
        ::
        
            usage: csb2format [-h] [-s] [-df] [-d DECIMAL] [-e ENCODING] [--use-float]
                            [-V]
                            [-f {csv,dbf,df,homebank,html,json,latex,ods,ofx,ofx1,tsv,xls,xlsx,yaml}]
                            [-v]
                            csbFile convertedFile
        
            Convierte un fichero CSB43 a otro formato
        
            optional arguments:
            -h, --help            show this help message and exit
            -v, --version         show program's version number and exit
        
            csb43 arguments:
            csbFile               fichero csb43 ('-' para entrada estándar)
            -s, --strict          modo estricto (por defecto: False)
            -df, --dayfirst       usa DDMMYY -día, mes, año- como formato de fecha al
                                    interpretar los datos del fichero csb43 en lugar de
                                    YYMMDD -año, mes, día- (por defecto: True)
            -d DECIMAL, --decimal DECIMAL
                                    establece el número de dígitos decimales a considerar
                                    en el tipo de divisa (por defecto: 2)
            -e ENCODING, --encoding ENCODING
                                    establece la codificación de entrada ('cp850' para
                                    fichero AEB estándar, por defecto: 'latin1')
            --use-float           exporta cantidades monetarias usando números binarios
                                    en punto flotante como último recurso (default: False)
            -V, --verbose         mostrar avisos de csb43
        
            output arguments:
            convertedFile         fichero de destino ('-' para salida estándar)
            -f {csv,dbf,df,homebank,html,json,latex,ods,ofx,ofx1,tsv,xls,xlsx,yaml}, --format {csv,dbf,df,homebank,html,json,latex,ods,ofx,ofx1,tsv,xls,xlsx,yaml}
                                Formato del fichero de salida (por defecto: ofx)
        
        
        
        
        
        Ejemplos
        ^^^^^^^^
        
        -  Convertir a formato OFX:
        
           ::
        
               $ csb2format transactions.csb transactions.ofx
        
               $ csb2format --format ofx transactions.csb transactions.ofx
        
           o bien
        
           ::
        
               $ csb2format transactions.csb - > transactions.ofx
        
           Desde una aplicación de recuperación de datos a otro fichero
        
           ::
        
               $ get_my_CSB_transactions | csb2format - transactions.ofx
        
        -  Convertir a hoja de cálculo XLSX (Excel):
        
           ::
        
               $ csb2format --format xlsx transactions.csb transactions.xlsx
        
        - Usando cp850 como codificación de entrada:
        
            ::
        
                $ csb2format --encoding cp850 --format xlsx transactions.csb transactions.xlsx
        
        
        Hojas de cálculo
        ^^^^^^^^^^^^^^^^
        
        
        Los ficheros en *ODS*, *XLS* y *XLSX* se generan a modo de libro, conteniendo
        la primera hoja la información relativa a las cuentas, y las hojas
        siguientes conteniendo cada una los movimientos de cada cuenta.
        
        
        
        En Python
        ~~~~~~~~~
        
        
        Lee un archivo *CSB43* e imprime el contenido equivalente en *OFX*
        
        ::
        
            :::python
        
            # OFX
            from csb43.ofx import converter as ofx_converter
            from csb43.csb43 import File
        
            csbFile = File(open("movimientos.csb", "rb"), strict=False)
        
            # imprime a stdout
            print(ofx_converter.convertFromCsb(csbFile))
        
        Lee un archivo *CSB* e imprime el contenido equivalente a *CSV* de
        *Homebank*
        
        ::
        
            :::python
        
            # Homebank
            from csb43.homebank import converter as hbk_converter
            from csb43.csb43 import File
        
            csbFile = File(open("movimientos.csb", "rb"), strict=False)
        
            # imprime a stdout
            for line in hbk_converter.convertFromCsb(csbFile):
                print(line)
        
        Lee un archivo *CSB* e imprime el equivalente en un archivo de formato
        tabular o de diccionario
        
        ::
        
            :::python
        
            from csb43 import csb43, formats
        
            csbFile = csb43.File(open("movimientos.csb", "rb"), strict=False)
        
            # imprime formato 'yaml' a stdout
            o = formats.convertFromCsb(csbFile, 'yaml')
            print(o.yaml)
        
            # escribe a archivo en formato 'xlsx'
            o = formats.convertFromCsb(csbFile, 'xlsx')
            with open("movimientos.xlsx", "wb") as f:
                f.write(o.xlsx)
        
        
        --------------
        
        
        
        English
        -------
        
        Tools for converting from the Spanish banks' format **CSB norm 43**
        (*CSB43*).
        
        
        csb2format
        ~~~~~~~~~~
        
        Convert a **CSB/AEB norm 43** file to other file formats.
        
        Supported formats:
        
        - OFX v1.0.3 (SGML) & v2.1.1 (XML)
        - `HomeBank CSV <http://homebank.free.fr/help/06csvformat.html>`_
        - *HTML*
        - *JSON*
        - *ODS*: OpenDocument spreadsheet
        - *CSV*, *TSV*: comma- or tab- separated values
        - *XLS*: Microsoft Excel spreadsheet
        - *XLSX*: OOXML spreadsheet
        - *YAML*
        
        
        Installing:
        ^^^^^^^^^^^^
        
        All the available formats:
        
        ::
        
            pip install csb43[all]
        
        Built-in formats (ofx, ofx1, homebank) plus YAML:
        
        ::
        
            pip install csb43[yaml]
        
        Built-in formats (ofx, ofx1, homebank) plus formats provided by the package
        `tablib`:
        
        ::
        
            pip install csb43[formats]
        
        If you don't need all the formats supported by tablib, you can use;
        
        ::
        
            pip install csb43[basic_formats]
        
        
        Options:
        ^^^^^^^^
        
        ::
        
            usage: csb2format [-h] [-s] [-df] [-d DECIMAL] [-e ENCODING] [--use-float]
                             [-V]
                             [-f {csv,dbf,df,homebank,html,json,latex,ods,ofx,ofx1,tsv,xls,xlsx,yaml}]
                             [-v]
                             csbFile convertedFile
        
            Convert a CSB43 file to another format
        
            optional arguments:
            -h, --help            show this help message and exit
            -v, --version         show program's version number and exit
        
            csb43 arguments:
            csbFile               a csb43 file ('-' for stdin)
            -s, --strict          strict mode (default: False)
            -df, --dayfirst       use DDMMYY as date format while parsing the csb43 file
                                    instead of YYMMDD (default: True)
            -d DECIMAL, --decimal DECIMAL
                                    set the number of decimal places for the currency type
                                    (default: 2)
            -e ENCODING, --encoding ENCODING
                                    set the input encoding ('cp850' for standard AEB file,
                                    default: 'latin1')
            --use-float           export monetary amounts using binary floating point
                                    numbers as a fallback (default: False)
            -V, --verbose         show csb43 warnings
        
            output arguments:
            convertedFile         destination file ('-' for stdout)
            -f {csv,dbf,df,homebank,html,json,latex,ods,ofx,ofx1,tsv,xls,xlsx,yaml}, --format {csv,dbf,df,homebank,html,json,latex,ods,ofx,ofx1,tsv,xls,xlsx,yaml}
                                    Format of the output file (default: ofx)
        
        
        
        
        
        Examples
        ^^^^^^^^
        
        - Converting to OFX format:
        
            ::
        
                $ csb2format transactions.csb transactions.ofx
        
                $ csb2format --format ofx transactions.csb transactions.ofx
        
            or
        
            ::
        
                $ csb2format transactions.csb - > transactions.ofx
        
            From another app to file
        
            ::
        
                $ get_my_CSB_transactions | csb2format - transactions.ofx
        
        - Converting to XLSX spreadsheet format:
        
            ::
        
                $ csb2format --format xlsx transactions.csb transactions.xlsx
        
        - Using cp850 as the input encoding:
        
            ::
        
                $ csb2format --encoding cp850 --format xlsx transactions.csb transactions.xlsx
        
        
        Spreadsheets
        ^^^^^^^^^^^^
        
        
        *ODS*, *XLS* and *XLSX* files are generated as books, with the first sheet
        containing the accounts information, and the subsequent sheets
        containing the transactions of each one of the accounts.
        
        
        Using Python
        ~~~~~~~~~~~~
        
        
        Parse a *CSB43* file and print the equivalent *OFX* file
        
        ::
        
            :::python
        
            # OFX
            from csb43.ofx import converter as ofx_converter
            from csb43.csb43 import File
        
            csbFile = File(open("movimientos.csb", "rb"), strict=False)
        
            # print to stdout
            print(ofx_converter.convertFromCsb(csbFile))
        
        Parse a *CSB43* file and print the equivalent *HomeBank CSV* file
        
        ::
        
            :::python
            # Homebank
            from csb43.homebank import converter as hbk_converter
            from csb43.csb43 import File
        
            csbFile = File(open("movimientos.csb", "rb"), strict=False)
        
            # print to stdout
            for line in hbk_converter.convertFromCsb(csbFile):
                print(line)
        
        Parse a *CSB43* file and print the equivalent in a tabular or
        dictionary-like file format
        
        ::
        
            :::python
        
            from csb43 import csb43, formats
        
            csbFile = csb43.File(open("movimientos.csb", "rb"), strict=False)
        
            # print 'yaml' format to stdout
            o = formats.convertFromCsb(csbFile, 'yaml')
            print(o.yaml)
        
            # write 'xlsx' format to file
            o = formats.convertFromCsb(csbFile, 'xlsx')
            with open("movimientos.xlsx", "wb") as f:
                f.write(o.xlsx)
        
        
        
        Instalación
        -----------
        
        Usando *pip*
        
        ::
        
            $ pip install csb43
        
        
        Installing
        -----------
        
        Using *pip*
        
        ::
        
            $ pip install csb43
        
        
        
        
        
        Changelog
        -----------
        
        0.9.2
        ~~~~~
        
        - Fixed setuptool's deprecation warning on python==3.10 (thanks to @mb)
        - Fixed duplicated documentation of the same objects by sphinx (thanks to @mb)
        
        
        0.9.1
        ~~~~~
        
        - Added python_requires >= 3.6 (thanks to Cédric Krier)
        
        0.9.0
        ~~~~~
        
        - Dropped support for Python 2 (thanks to Sergi Almacellas)
        - Added support for Python 3.8 and 3.9 (thanks to Sergi Almacellas)
        - Added compatibility with tablib >= 1.0.0 (thanks to Sergi Almacellas)
        - Type hinting
        
        0.8.4
        ~~~~~
        
        - Fixed tablib requirement (< 1.0.0)
        - Fixed parsing of records with code 00 (thanks to Uttam Sharma)
        
        
        0.8.2
        ~~~~~
        
        - Do not fail with C locale (thanks to Cédric Krier)
        
        0.8.1
        ~~~~~
        
        - Fixed decimal values conversion in JSON and tabular formats (thanks to Harshad Modi).
        - Fixed OFX validation (ORIGCURRENCY field).
        - An error is raised when the currency code is not found.
        
        
        0.8
        ~~~
        
        - Text values are stored as string instead of bytes (thanks to Sergi Almacellas)
        - Warnings are raised using the 'warnings' module.
        - An encoding where control characters are different from ascii is not allowed. An exception will be raised.
        - csb2format: added encoding as a new parameter.
        
        0.7
        ~~~
        
        - Defined installation targets: `yaml` and `formats` (thanks to Sergi Almacellas & Cédric Krier).
        - Updated README file (thanks to Sergi Almacellas).
        - Removed `simplejson` dependency.
        - Dates stored as `date` instead of `datetime` (thanks to Sergi Almacellas).
        - Monetary amounts are represented as `Decimal` instead to `float` in order to prevent representation and rounding issues. These fields are exported as a string by default, conversion to float is optional (thanks to Sergi Almacellas & Cédric Krier).
        - Added temprary dependency to `openpyxl < 2.5.0` to prevent issue while trying to export to xlsx.
        
        0.6
        ~~~~
        
        - Fixed usage of pycountry >= 16.10.23rc1 objects (thanks to Alex Barcelo).
        - Package refactored to simplify the structure.
        
        0.5
        ~~~~
        
        - Fixed conversion to binary formats in python 2.
        - `tablib` backend supported in python 3.
        - N43 warnings are silenced by default.
        
        0.4
        ~~~~
        
        - OFX v 1.0.3 supported.
        - OFX Tag inv401source renamed to inv401ksource.
        - Unique transaction id when generating OFX file (thanks to Julien Moutte).
        
        0.3.4
        ~~~~~
        
        - Most Spanish N43 files will use LATIN-1 encoding not pure ASCII (thanks to Julien Moutte).
        - Regular expression to check for account name is too limited (thanks to Julien Moutte).
        - Reference1 can hold non numerical data in information mode 1 and 2 (thanks to Julien Moutte).
        - Currency data as an inmutable list.
        
        0.3.3
        ~~~~~
        
        - Fixed deficiencies in OFX conversion (thanks to Andrea Santambrogio). Checked XML validation against OFX2_Protocol.xsd
        
        0.3
        ~~~~
        
        - Compatible with Python 3 (except "tablib" dependencies)
        
        0.2.3
        ~~~~~~
        
        - Fixed shebang header of csb2format
        
        
        0.2.2
        ~~~~~~
        
        - csb2format adapted to pyinstaller
        - Executable file for Windows
        
        0.2.1
        ~~~~~
        
        - Trivial changes
        
        0.2
        ~~~~
        
        - Several bugfixes
        - Bidirectional use of objects (file -> object, object -> file)
        - Added conversion to spreadsheets, dict and tabular formats (thanks to tablib)
        - Localization to Spanish
        - Sphinx documentation
        
        0.1
        ~~~
        
        - Initial release
        
        
        
Keywords: csb csb43 aeb aeb43 homebank ofx Spanish bank ods tsv xls xlsx excel yaml json html
Platform: UNKNOWN
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Topic :: Utilities
Classifier: Topic :: Office/Business :: Financial
Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)
Requires-Python: >=3.6
Provides-Extra: babel
Provides-Extra: yaml
Provides-Extra: basic_formats
Provides-Extra: formats
Provides-Extra: all