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

remove subtotal row if it exists #4

Merged
merged 3 commits into from
Apr 22, 2024
Merged

Conversation

jpjpjp
Copy link
Contributor

@jpjpjp jpjpjp commented Apr 21, 2024

When I use the Amazon Order History Reporter plugin it creates a final row in the output CSV that looks something like this:

"=SUBTOTAL(103, A2:A11) & "" items""",,,,,"=SUBTOTAL(109,F2:F11)","=SUBTOTAL(109,G2:G11)","=SUBTOTAL(109,H2:H11)","=SUBTOTAL(109,I2:I11)","=SUBTOTAL(109,J2:J11)","=SUBTOTAL(109,K2:K11)",,

I run this tool just infrequently enough that I always forget I need to remove this line.

This change checks for its existence and removes it from the dataframe of amazon order information

When I use the Amazon Order History Reporter plugin it creates a final row in the output CSV that looks something like this:
```
"=SUBTOTAL(103, A2:A11) & "" items""",,,,,"=SUBTOTAL(109,F2:F11)","=SUBTOTAL(109,G2:G11)","=SUBTOTAL(109,H2:H11)","=SUBTOTAL(109,I2:I11)","=SUBTOTAL(109,J2:J11)","=SUBTOTAL(109,K2:K11)",,
```

I run this tool just infrequently enough that I always forget I need to remove this line.  

This change checks for its existence and removes it from the dataframe of amazon order information
@juftin
Copy link
Owner

juftin commented Apr 22, 2024

Nice - thank you! I haven't run into this before - but I will get this teested and pushed

@juftin
Copy link
Owner

juftin commented Apr 22, 2024

I tested this using pipx:

pipx run \
  --spec git+https://github.com/jpjpjp/lunchable-primelunch@tolerate_subtotal_row \
  lunchable-primelunch \
  -f ~/Downloads/amazon_order_history.csv \
  -w 28

@juftin juftin merged commit 4a44637 into juftin:main Apr 22, 2024
6 checks passed
github-actions bot added a commit that referenced this pull request Apr 22, 2024
# [v1.0.2](v1.0.1...v1.0.2) (2024-04-22)

## 🐛 Bug Fixes
- [`4a44637`](4a44637)  remove subtotal row if it exists (Issues: [`#4`](#4))

[skip ci]
@juftin
Copy link
Owner

juftin commented Apr 22, 2024

🎉 This PR is included in version 1.0.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@juftin
Copy link
Owner

juftin commented Apr 22, 2024

Shoot - there was a failure on the release to PyPI. I'll get this sorted

@juftin
Copy link
Owner

juftin commented Apr 23, 2024

Alright, everything is resolved now and 1.02 was just published on PyPI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants