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

Add ownership mine filter #3

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

downey-lv
Copy link
Contributor

@downey-lv downey-lv commented Oct 7, 2024

I had quite a few flights that I had booked for others and sorted so in AITA, added flag to exclude those here.

Possible values for the ownership is Ownership.MINE, Ownership.NOT_MINE, Ownership.UNKNOWN
I'm seeing the UNKNOWN one for hotel only entries.

@moshobo
Copy link
Owner

moshobo commented Oct 8, 2024

Thanks for submitting. I'll review this in a day or two.

In the meantime, do you have some sample data I can test this with?

@downey-lv
Copy link
Contributor Author

Sure, here's a sample:

Ownership.NOT_MINE;2016-02-26T10:10:00;2016-02-26T13:05:00;GRU;AEP;2020-07-28T15:36:20.391373;2022-10-27T07:50:40.761869;None
flights:
PLUS;23B;None;None;None;None;gmail_parsing_schema;JJ;8014;320;GRU;AEP;2016-02-26T10:10:00;2016-02-26T13:05:00;2016-02-26T07:10:00;2016-02-26T10:05:00;2020-07-28T15:36:20
hotels:

rental cars:

expenses:


Ownership.NOT_MINE;2015-11-20T05:30:00;2015-11-20T20:30:00;RIX;HAV;2020-07-28T15:49:48.812411;2022-10-27T13:13:14.329181;None
flights:
None;None;None;None;None;None;gmail_parsing_amadeus3.yaml;AF;7983;73C;RIX;CDG;2015-11-20T05:30:00;2015-11-20T08:25:00;2015-11-20T07:30:00;2015-11-20T09:25:00;2020-07-28T15:49:48
None;None;None;None;None;None;gmail_parsing_amadeus3.yaml;AF;940;77W;CDG;HAV;2015-11-20T10:05:00;2015-11-20T20:30:00;2015-11-20T11:05:00;2015-11-20T15:30:00;2020-07-28T15:49:54
hotels:

rental cars:

expenses:


Ownership.MINE;2019-06-13T13:20:00;2019-06-16T18:40:00;RIX;RIX;2020-07-28T09:43:28.211877;2023-08-17T17:41:22.506175;None
flights:
None;12A;None;None;None;None;search;BT;233;733;RIX;DUS;2019-06-13T13:20:00;2019-06-13T15:40:00;2019-06-13T16:20:00;2019-06-13T17:40:00;2020-07-28T09:43:28
None;12A;None;None;None;None;search;BT;234;733;DUS;RIX;2019-06-16T16:35:00;2019-06-16T18:40:00;2019-06-16T18:35:00;2019-06-16T21:40:00;2020-07-28T09:43:59
hotels:

rental cars:

expenses:

@@ -111,17 +111,28 @@ def main():
type=str,
help="File name used for outputted csv. Should include .csv extension"
)
parser.add_argument(
'-m',
'--mine',
Copy link
Owner

Choose a reason for hiding this comment

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

What are your thoughts on making this argument --ownership?

I am thinking that then a user can pass nargs of strings (MINE, NOT_MINE, UNKNOWN) and the script will include any matching trips if the Ownership matches.

@moshobo
Copy link
Owner

moshobo commented Oct 30, 2024

Hey @downey-lv, just wanted to see if you were planning to make the suggested changes?

@downey-lv
Copy link
Contributor Author

Sorry about the delay, I agree with your suggestion, will push an update

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