package project and add entrypoint

This commit is contained in:
2025-12-07 08:20:48 -05:00
parent 163b4a525c
commit dda8c3403d
3 changed files with 8 additions and 1 deletions

View File

@@ -16,6 +16,9 @@ dependencies = [
"ynab>=1.9.0",
]
[project.scripts]
catnab = "main:main"
[dependency-groups]
dev = [
"ipdb>=0.13.13",
@@ -24,3 +27,6 @@ dev = [
[tool.pytest.ini_options]
pythonpath = ["src"]
[tool.uv]
package = true

View File

@@ -217,6 +217,7 @@ def main():
@main.command
@click.option('--days', type=int, default=30)
def sync(days: int):
"""Auto-categorize Amazon transactions known to YNAB."""
ctx = Context(days)
for acct in amazon.get_accounts():
sync_account(ctx, acct)

2
uv.lock generated
View File

@@ -81,7 +81,7 @@ wheels = [
[[package]]
name = "catnab"
version = "0.1.0"
source = { virtual = "." }
source = { editable = "." }
dependencies = [
{ name = "amazon-orders" },
{ name = "click" },