Giter Site home page Giter Site logo

ofxstatement-revolut's People

Contributors

3v1n0 avatar andy-vdg avatar archont00 avatar mlaitinen avatar ndfred avatar petri avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

ofxstatement-revolut's Issues

unable to parse french statement

Hello,
I'm trying to use the revolut plugin on my statement.
First of all in edited the ofxstatement config file in order to modify the format date to '%%d %%b. %%Y'
Then i modified the header of the csv statement file (when it is translated in english, it complies with the May 2018 signature in .../plugins/revolut.py).

Here is the content of my config file:

[revolut]
plugin = revolut
date_format = %%d %%b. %%Y
account = revolut_account
currency = EUR

Then when i execute the code i have the following exception:

$ ofxstatement convert -t revolut testfile.csv res.csv
        
Traceback (most recent call last):
  File "/donnees/informatique/anaconda/bin/ofxstatement", line 8, in <module>
    sys.exit(run())
  File "/donnees/informatique/anaconda/lib/python3.7/site-packages/ofxstatement/tool.py", line 195, in run
    return args.func(args)
  File "/donnees/informatique/anaconda/lib/python3.7/site-packages/ofxstatement/tool.py", line 166, in convert
    statement = parser.parse()
  File "/donnees/informatique/anaconda/lib/python3.7/site-packages/ofxstatement/parser.py", line 49, in parse
    stmt_line.assert_valid()
  File "/donnees/informatique/anaconda/lib/python3.7/site-packages/ofxstatement/statement.py", line 158, in assert_valid
    assert self.id or self.check_no or self.refnum
AssertionError

Here is the content of testfile.csv:

Completed Date ; Description ; Paid Out (EUR) ; Paid In (EUR) ; Exchange Out; Exchange In; Balance (EUR); Category; Notes
08 nov. 2020 ; Rayon Bio       4894386  ; 1,77 ;  ;  ;  ; 1 270,39; Courses; 
7 nov. 2020 ; Grand Frais  ; 29,18 ;  ;  ;  ; 1 272,16; Courses; 
7 nov. 2020 ; Art Prog  ; 20,75 ;  ;  ;  ; 1 301,34; Services;

I use ofxstatement 0.7.1

Hope this help. This plugin may be so usefull for many people who want to use gnucash-like softwares with their revolut files.
Thx :)

Crash if `Balance` value is unset

This may have happened on some balance migration events, where there's no balance value, and we crash with:

Traceback (most recent call last):
  File "/home/marco/.local/bin/ofxstatement", line 8, in <module>
    sys.exit(run())
  File "/home/marco/.local/lib/python3.10/site-packages/ofxstatement/tool.py", line 205, in run
    return args.func(args)
  File "/home/marco/.local/lib/python3.10/site-packages/ofxstatement/tool.py", line 176, in convert
    statement = parser.parse()
  File "/home/marco/.local/lib/python3.10/site-packages/ofxstatement/plugins/revolut.py", line 69, in parse
    statement = super().parse()
  File "/home/marco/.local/lib/python3.10/site-packages/ofxstatement/parser.py", line 46, in parse
    stmt_line = self.parse_record(line)
  File "/home/marco/.local/lib/python3.10/site-packages/ofxstatement/plugins/revolut.py", line 61, in parse_record
    balance = self.parse_float(line[c["Balance"]])
  File "/home/marco/.local/lib/python3.10/site-packages/ofxstatement/parser.py", line 77, in parse_float
    return self.parse_decimal(value)
  File "/home/marco/.local/lib/python3.10/site-packages/ofxstatement/parser.py", line 81, in parse_decimal
    return D(value.replace(",", ".").replace(" ", ""))
decimal.InvalidOperation: [<class 'decimal.ConversionSyntax'>]

csv triggering this:

TRANSFER,Current,2020-11-13 03:44:18,2020-11-13 03:44:18,Balance migration to another region or legal entity,-123.45,0.00,EUR,COMPLETED,
TRANSFER,Current,2020-11-13 03:44:18,2020-11-13 03:44:18,Balance migration to another region or legal entity,123.45,0.00,EUR,COMPLETED,

Conflicting file with ofxstatement package: ofxstatement/tests/samples/config.ini

Hi,

Arch Linux:

error: failed to commit transaction (conflicting files)
ofxstatement-revolut-git: /usr/lib/python3.9/site-packages/ofxstatement/tests/samples/config.ini exists in filesystem (owned by ofxstatement)
Errors occurred, no packages were upgraded.

It would be better to rename your config.ini to whatever else to avoid the conflict.

Pip installs old version of ofxstatement-revolut (1.6.0)

When installing ofxstatement-revolut package older version is selected.

~/> pip3 install ofxstatement-revolut==2.0.0
Defaulting to user installation because normal site-packages is not writeable
ERROR: Could not find a version that satisfies the requirement ofxstatement-revolut==2.0.0 (from versions: 1.2.0, 1.3.1, 1.4.0, 1.6.0)
ERROR: No matching distribution found for ofxstatement-revolut==2.0.0

Version 2.0.0 of this package is published as .egg and it is not supported by pip. installation_log.txt

Here is a discussion on similar problem: [link](https://stackoverflow.com/questions/41757965/pip-installs-old-version-of-package

Date format?

Hi,

the class RevolutCSVStatementParser(CsvStatementParser): sets date_format = "%b %d, %Y".

This might be somewhat dependent on OS language settings and language variants Revolut app supports:

English / UK: 18 May 2018
Deutsch / Deutschland: 18.05.2018
Czech: May 18, 2018 (obviously not Czech, but rather English US style).

Any ideas how to deal with that? A dictionary to allow user set his own format?

Support filtering by "Product"

My CSV exports from Revolut contain multiple accounts in the same file (e.g. stocks and current account). What if we added support a setting to filter the transactions by the "Product" column, so that multiple OFX files can be generated from the same CSV?

See also kedder/ofxstatement#47

Account currency

Hi,

Any chance to set parser.statement.currency as per currency code in the header line of the CSV file Paid Out (CCY)?

That would limit the configuration to a single entry for all the currencies Revolut supports.

P.S. And the signature matching would have to be more general.

Adding this package to Pip registry

Hey there!

I'm not super well versed in how the Pip registry works, but trying to just pip install ofxstatement-revolut doesn't do it for me, and it feels like it should. I'm currently using a workaround by pulling straight from Github (example of that), but I'd like to be able to just do the pip command route.

Could you please upload the package to the appropriate registries?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.