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

feat: add transaction export as JSON #50

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

morremeyer
Copy link

This adds a transactions command that is similar to the export_transactions command.

However, transactions uses the timelineTransactions, which contain all transactions and exports the JSON as seen on the websocket to a target file.

@morremeyer morremeyer changed the title feat: add transaction export to YNAB import format feat: add transaction export as JSON Mar 23, 2024
pytr/transactions.py Outdated Show resolved Hide resolved
pytr/transactions.py Outdated Show resolved Hide resolved
pytr/main.py Outdated
description=info,
)
transactions.add_argument(
'output', help='Output path of CSV file', metavar='OUTPUT', type=Path)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For some commands output is a file, sometimes a folder. That may be confusing, no?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I can't quite follow this comment.

I took a look at export_transactions when writing this, where the file is specified, too.
I prefer that over only specifying a folder, because it is easy to use in scripts.

pytr/transactions.py Outdated Show resolved Hide resolved
pytr/api.py Outdated Show resolved Hide resolved
@morremeyer
Copy link
Author

Thanks for your feedback, I'll address it in the upcoming days!

Copy link
Author

@morremeyer morremeyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Katzmann1983 I added all your suggestions, thanks for the detailed review!

Sorry for the force push here, I only realized once I had already pushed.

My only question is in regards to the output parameter, I don't think I quite got your comment there.

pytr/transactions.py Outdated Show resolved Hide resolved
pytr/transactions.py Outdated Show resolved Hide resolved
pytr/transactions.py Outdated Show resolved Hide resolved
pytr/main.py Outdated
description=info,
)
transactions.add_argument(
'output', help='Output path of CSV file', metavar='OUTPUT', type=Path)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I can't quite follow this comment.

I took a look at export_transactions when writing this, where the file is specified, too.
I prefer that over only specifying a folder, because it is easy to use in scripts.

pytr/api.py Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants