Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ideas for improving the documentation #23

Open
mscheper opened this issue Aug 3, 2017 · 6 comments
Open

Ideas for improving the documentation #23

mscheper opened this issue Aug 3, 2017 · 6 comments
Labels

Comments

@mscheper
Copy link

mscheper commented Aug 3, 2017

I played with this library today, hoping it'd help me convert my financial data into a format I could upload to QuickBooks. Unfortunately, QuickBooks rejects the output files, with unhelpful error messages, even though GNUCash does them.

In any case, some improvement to the README.md documentation would've helped me understand this library a little more quickly. Here are some suggestions:

  • Specify that the expected date format is MM/DD/YYYY—this is an unusual format (only two or three countries use it), so it ought to be made clear
  • Mention that, by default, future-dated transactions are excluded (some of my transactions were missing because they were from the other side of the international dateline)
  • Explain how mapping works. e.g. 'mapping should be a map of output field names to functions that return values for those fields. The functions should expect a single parameter: a map of input field names to their values. For example, { 'date': lambda r: '%s/%s/%s' % (r['month'], r['day'], r['year']) } expects the input CSV to have separate "month", "day" and "year" columns, and will combine these into a single "date" output column, in the MM/DD/YYYY format.'
  • For each field, particularly the optional ones, specify, which OFX elements they map to, e.g. that notes and class get combined into the <MEMO> element
  • Explain how splits work.
@reubano
Copy link
Owner

reubano commented Aug 4, 2017

Great ideas! #22 partially addresses this. As of the commit closing that issue, you can set a custom date format in the mapping. Also, one thing to point out is that the mapping values don't have to be functions.. something like {'date': 'txn_date'} is also acceptable. If you have time to submit a PR with necessary documentation updates, I would be very grateful!

@reubano
Copy link
Owner

reubano commented Aug 4, 2017

I agree, I never really explained split in detail... it's mentioned here and is easiest to understand by comparing mint.csv (not split) to xero.csv (split). To parse xero.csv you would add --collapse Description --mapping xero to the command.

@reubano
Copy link
Owner

reubano commented Aug 4, 2017

Also, one thing to point out is that the mapping values don't have to be functions.. something like {'date': 'txn_date'}

Sorry, I misspoke here.... {'bank': 'My Bank'} is a better example. If you pass a string, that value is used for all rows. You only need a function if the value is dependent on information in the row. E.g., in the initial example, you could have {'date': itemgetter('txn_date')}.

@reubano
Copy link
Owner

reubano commented Aug 4, 2017

To parse xero.csv you would add --collapse Description --mapping xero to the command.

This works because xero.py has mapping = {'is_split': True, ...}.

@reubano
Copy link
Owner

reubano commented Aug 4, 2017

CR #16

@mscheper
Copy link
Author

mscheper commented Aug 4, 2017

Thanks for the reply. I'll keep this tab open, but I'm trying to get some work finished before travelling so I honestly don't think it's likely I'll have time to make good improvements any time soon. But don't give up hope. ☺ Thanks for making the code available.

@reubano reubano added the docs label Apr 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants