Compare commits
2 commits
831df98437
...
23304ba20e
| Author | SHA1 | Date | |
|---|---|---|---|
| 23304ba20e | |||
| ba883a5868 |
2 changed files with 17 additions and 9 deletions
|
|
@ -12,11 +12,7 @@ import sys
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
try:
|
import matplotlib.pyplot as plt
|
||||||
import matplotlib.pyplot as plt
|
|
||||||
HAS_MATPLOTLIB = True
|
|
||||||
except ImportError:
|
|
||||||
HAS_MATPLOTLIB = False
|
|
||||||
|
|
||||||
|
|
||||||
def load_transactions(json_files: list[Path]) -> list[dict]:
|
def load_transactions(json_files: list[Path]) -> list[dict]:
|
||||||
|
|
@ -208,10 +204,6 @@ def main():
|
||||||
if not path.exists():
|
if not path.exists():
|
||||||
sys.exit(f"Error: File not found: {path}")
|
sys.exit(f"Error: File not found: {path}")
|
||||||
|
|
||||||
# Check matplotlib early if graph requested
|
|
||||||
if args.graph and not HAS_MATPLOTLIB:
|
|
||||||
sys.exit("Error: matplotlib is required for graphs. Install with: pip install matplotlib")
|
|
||||||
|
|
||||||
# Load categories
|
# Load categories
|
||||||
if not args.categories.exists():
|
if not args.categories.exists():
|
||||||
sys.exit(f"Error: Categories file not found: {args.categories}")
|
sys.exit(f"Error: Categories file not found: {args.categories}")
|
||||||
|
|
|
||||||
16
setup.py
Normal file
16
setup.py
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
from setuptools import setup
|
||||||
|
|
||||||
|
setup(
|
||||||
|
name="bac-import",
|
||||||
|
description="Extract and analyze BAC Costa Rica credit card statements",
|
||||||
|
author="Fabian Montero <fabian@posixlycorrect.com>",
|
||||||
|
version="0.1.0",
|
||||||
|
py_modules=["bac_extract", "bac_analyze"],
|
||||||
|
install_requires=["pdfplumber>=0.10.0", "matplotlib>=3.5.0"],
|
||||||
|
entry_points={
|
||||||
|
"console_scripts": [
|
||||||
|
"bac-extract=bac_extract:main",
|
||||||
|
"bac-analyze=bac_analyze:main",
|
||||||
|
],
|
||||||
|
},
|
||||||
|
)
|
||||||
Loading…
Add table
Add a link
Reference in a new issue