ynab-amazon-categorizer 2.2.2__tar.gz → 2.2.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ynab_amazon_categorizer-2.2.2 → ynab_amazon_categorizer-2.2.3}/CHANGELOG.md +6 -0
- {ynab_amazon_categorizer-2.2.2 → ynab_amazon_categorizer-2.2.3}/PKG-INFO +1 -1
- {ynab_amazon_categorizer-2.2.2 → ynab_amazon_categorizer-2.2.3}/src/ynab_amazon_categorizer/_version.py +3 -3
- {ynab_amazon_categorizer-2.2.2 → ynab_amazon_categorizer-2.2.3}/src/ynab_amazon_categorizer/amazon_parser.py +14 -0
- {ynab_amazon_categorizer-2.2.2 → ynab_amazon_categorizer-2.2.3}/src/ynab_amazon_categorizer.egg-info/PKG-INFO +1 -1
- {ynab_amazon_categorizer-2.2.2 → ynab_amazon_categorizer-2.2.3}/tests/test_amazon_parser.py +37 -0
- {ynab_amazon_categorizer-2.2.2 → ynab_amazon_categorizer-2.2.3}/uv.lock +1 -1
- {ynab_amazon_categorizer-2.2.2 → ynab_amazon_categorizer-2.2.3}/.env.example +0 -0
- {ynab_amazon_categorizer-2.2.2 → ynab_amazon_categorizer-2.2.3}/.git_archival.txt +0 -0
- {ynab_amazon_categorizer-2.2.2 → ynab_amazon_categorizer-2.2.3}/.gitattributes +0 -0
- {ynab_amazon_categorizer-2.2.2 → ynab_amazon_categorizer-2.2.3}/.github/workflows/release.yml +0 -0
- {ynab_amazon_categorizer-2.2.2 → ynab_amazon_categorizer-2.2.3}/.gitignore +0 -0
- {ynab_amazon_categorizer-2.2.2 → ynab_amazon_categorizer-2.2.3}/.pre-commit-config.yaml +0 -0
- {ynab_amazon_categorizer-2.2.2 → ynab_amazon_categorizer-2.2.3}/AGENTS.md +0 -0
- {ynab_amazon_categorizer-2.2.2 → ynab_amazon_categorizer-2.2.3}/CLAUDE.md +0 -0
- {ynab_amazon_categorizer-2.2.2 → ynab_amazon_categorizer-2.2.3}/DEVELOPMENT.md +0 -0
- {ynab_amazon_categorizer-2.2.2 → ynab_amazon_categorizer-2.2.3}/LICENSE +0 -0
- {ynab_amazon_categorizer-2.2.2 → ynab_amazon_categorizer-2.2.3}/README.md +0 -0
- {ynab_amazon_categorizer-2.2.2 → ynab_amazon_categorizer-2.2.3}/pyproject.toml +0 -0
- {ynab_amazon_categorizer-2.2.2 → ynab_amazon_categorizer-2.2.3}/setup.cfg +0 -0
- {ynab_amazon_categorizer-2.2.2 → ynab_amazon_categorizer-2.2.3}/src/ynab_amazon_categorizer/__init__.py +0 -0
- {ynab_amazon_categorizer-2.2.2 → ynab_amazon_categorizer-2.2.3}/src/ynab_amazon_categorizer/__main__.py +0 -0
- {ynab_amazon_categorizer-2.2.2 → ynab_amazon_categorizer-2.2.3}/src/ynab_amazon_categorizer/cli.py +0 -0
- {ynab_amazon_categorizer-2.2.2 → ynab_amazon_categorizer-2.2.3}/src/ynab_amazon_categorizer/config.py +0 -0
- {ynab_amazon_categorizer-2.2.2 → ynab_amazon_categorizer-2.2.3}/src/ynab_amazon_categorizer/exceptions.py +0 -0
- {ynab_amazon_categorizer-2.2.2 → ynab_amazon_categorizer-2.2.3}/src/ynab_amazon_categorizer/memo_generator.py +0 -0
- {ynab_amazon_categorizer-2.2.2 → ynab_amazon_categorizer-2.2.3}/src/ynab_amazon_categorizer/transaction_matcher.py +0 -0
- {ynab_amazon_categorizer-2.2.2 → ynab_amazon_categorizer-2.2.3}/src/ynab_amazon_categorizer/ynab_client.py +0 -0
- {ynab_amazon_categorizer-2.2.2 → ynab_amazon_categorizer-2.2.3}/src/ynab_amazon_categorizer.egg-info/SOURCES.txt +0 -0
- {ynab_amazon_categorizer-2.2.2 → ynab_amazon_categorizer-2.2.3}/src/ynab_amazon_categorizer.egg-info/dependency_links.txt +0 -0
- {ynab_amazon_categorizer-2.2.2 → ynab_amazon_categorizer-2.2.3}/src/ynab_amazon_categorizer.egg-info/entry_points.txt +0 -0
- {ynab_amazon_categorizer-2.2.2 → ynab_amazon_categorizer-2.2.3}/src/ynab_amazon_categorizer.egg-info/requires.txt +0 -0
- {ynab_amazon_categorizer-2.2.2 → ynab_amazon_categorizer-2.2.3}/src/ynab_amazon_categorizer.egg-info/top_level.txt +0 -0
- {ynab_amazon_categorizer-2.2.2 → ynab_amazon_categorizer-2.2.3}/tests/__init__.py +0 -0
- {ynab_amazon_categorizer-2.2.2 → ynab_amazon_categorizer-2.2.3}/tests/test_amazon_parser_real.py +0 -0
- {ynab_amazon_categorizer-2.2.2 → ynab_amazon_categorizer-2.2.3}/tests/test_cli_functions.py +0 -0
- {ynab_amazon_categorizer-2.2.2 → ynab_amazon_categorizer-2.2.3}/tests/test_config.py +0 -0
- {ynab_amazon_categorizer-2.2.2 → ynab_amazon_categorizer-2.2.3}/tests/test_memo_generator.py +0 -0
- {ynab_amazon_categorizer-2.2.2 → ynab_amazon_categorizer-2.2.3}/tests/test_transaction_matcher.py +0 -0
- {ynab_amazon_categorizer-2.2.2 → ynab_amazon_categorizer-2.2.3}/tests/test_ynab_client.py +0 -0
|
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [2.2.3] - 2026-05-05
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- Footer and nav boilerplate from the Amazon orders page (copyright lines, address blocks, credit card promos, accessibility hints) is no longer extracted as order items
|
|
15
|
+
|
|
10
16
|
## [2.2.2] - 2026-04-23
|
|
11
17
|
|
|
12
18
|
### Fixed
|
|
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
|
|
|
18
18
|
commit_id: str | None
|
|
19
19
|
__commit_id__: str | None
|
|
20
20
|
|
|
21
|
-
__version__ = version = '2.2.
|
|
22
|
-
__version_tuple__ = version_tuple = (2, 2,
|
|
21
|
+
__version__ = version = '2.2.3'
|
|
22
|
+
__version_tuple__ = version_tuple = (2, 2, 3)
|
|
23
23
|
|
|
24
|
-
__commit_id__ = commit_id = '
|
|
24
|
+
__commit_id__ = commit_id = 'gb865ea2d2'
|
|
@@ -91,6 +91,15 @@ class AmazonParser:
|
|
|
91
91
|
|
|
92
92
|
def extract_items_from_content(self, order_content: str) -> list[str]:
|
|
93
93
|
"""Extract item names from order content."""
|
|
94
|
+
# Trim at page footer sentinels to avoid extracting navigation/legal boilerplate
|
|
95
|
+
footer_sentinel = re.search(
|
|
96
|
+
r"©\s*\d{4}|To move between items",
|
|
97
|
+
order_content,
|
|
98
|
+
re.IGNORECASE,
|
|
99
|
+
)
|
|
100
|
+
if footer_sentinel:
|
|
101
|
+
order_content = order_content[: footer_sentinel.start()]
|
|
102
|
+
|
|
94
103
|
candidates: list[str] = []
|
|
95
104
|
lines = order_content.split("\n")
|
|
96
105
|
|
|
@@ -152,6 +161,11 @@ class AmazonParser:
|
|
|
152
161
|
"browse",
|
|
153
162
|
"prime",
|
|
154
163
|
"shipping",
|
|
164
|
+
"mastercard",
|
|
165
|
+
"your brand",
|
|
166
|
+
"registry & gift",
|
|
167
|
+
"attract and engage",
|
|
168
|
+
"interest-based",
|
|
155
169
|
]
|
|
156
170
|
if not any(word in cleaned_line.lower() for word in skip_words):
|
|
157
171
|
candidates.append(cleaned_line)
|
|
@@ -222,3 +222,40 @@ Now arriving today 5:15 p.m. - 8:15 p.m.
|
|
|
222
222
|
items = parser.extract_items_from_content(order_content)
|
|
223
223
|
assert all("arriving" not in i.lower() for i in items)
|
|
224
224
|
assert any("Psyllium" in i for i in items)
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
def test_footer_boilerplate_not_extracted() -> None:
|
|
228
|
+
"""Page footer and Amazon nav boilerplate must not appear as items."""
|
|
229
|
+
parser = AmazonParser()
|
|
230
|
+
|
|
231
|
+
order_content = """
|
|
232
|
+
Tampax Pearl Tampons, Plastic Applicator, Light Absorbency, 50 Count
|
|
233
|
+
Buy it again
|
|
234
|
+
Protect & Build Your Brand
|
|
235
|
+
Amazon.ca Rewards Mastercard
|
|
236
|
+
Registry & Gift List
|
|
237
|
+
Find, attract and engage customers
|
|
238
|
+
Interest-Based Ads
|
|
239
|
+
© 1996-2026, Amazon.com, Inc. or its affiliates
|
|
240
|
+
Amazon.com.ca ULC | 40 King Street W 47th Floor, Toronto, Ontario, Canada, M5H 3Y2
|
|
241
|
+
Influencers & Associates
|
|
242
|
+
To move between items, use your keyboard's up or down arrows.
|
|
243
|
+
"""
|
|
244
|
+
|
|
245
|
+
items = parser.extract_items_from_content(order_content)
|
|
246
|
+
|
|
247
|
+
assert len(items) == 1
|
|
248
|
+
assert "Tampax" in items[0]
|
|
249
|
+
for word in [
|
|
250
|
+
"Mastercard",
|
|
251
|
+
"Registry",
|
|
252
|
+
"attract",
|
|
253
|
+
"Interest-Based",
|
|
254
|
+
"affiliates",
|
|
255
|
+
"ULC",
|
|
256
|
+
"Influencers",
|
|
257
|
+
"keyboard",
|
|
258
|
+
]:
|
|
259
|
+
assert not any(word.lower() in item.lower() for item in items), (
|
|
260
|
+
f"Boilerplate '{word}' leaked into items"
|
|
261
|
+
)
|
|
@@ -486,6 +486,6 @@ requires-dist = [
|
|
|
486
486
|
{ name = "python-dotenv", specifier = ">=1.2.1" },
|
|
487
487
|
{ name = "requests", specifier = ">=2.32.5" },
|
|
488
488
|
{ name = "ruff", marker = "extra == 'dev'", specifier = ">=0.15.0" },
|
|
489
|
-
{ name = "ty", marker = "extra == 'dev'", specifier = "
|
|
489
|
+
{ name = "ty", marker = "extra == 'dev'", specifier = "==0.0.14" },
|
|
490
490
|
]
|
|
491
491
|
provides-extras = ["dev"]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ynab_amazon_categorizer-2.2.2 → ynab_amazon_categorizer-2.2.3}/.github/workflows/release.yml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ynab_amazon_categorizer-2.2.2 → ynab_amazon_categorizer-2.2.3}/src/ynab_amazon_categorizer/cli.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ynab_amazon_categorizer-2.2.2 → ynab_amazon_categorizer-2.2.3}/tests/test_amazon_parser_real.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ynab_amazon_categorizer-2.2.2 → ynab_amazon_categorizer-2.2.3}/tests/test_memo_generator.py
RENAMED
|
File without changes
|
{ynab_amazon_categorizer-2.2.2 → ynab_amazon_categorizer-2.2.3}/tests/test_transaction_matcher.py
RENAMED
|
File without changes
|
|
File without changes
|