Claude
Add plain-language trade journal report (/journal command + CLI)
81f2569 unverified
Raw
History Blame Contribute Delete
840 Bytes
#!/usr/bin/env python3
"""
scripts/journal.py — read the trade journal as a plain-language report.
python scripts/journal.py
Prints which routes made money, which lost it, and how often the spread was
real but network fees ate it. Same renderer the /journal Telegram command
uses (modules/journal_report.py), so the two can never disagree.
"""
import sys
from pathlib import Path
sys.path.insert(0, str(Path(__file__).resolve().parent.parent))
from modules.journal_report import render_journal_report # noqa: E402
def main() -> int:
# The renderer emits Telegram-flavored markdown; strip the two markers
# that add noise in a terminal rather than maintaining a second renderer.
print(render_journal_report().replace("*", "").replace("`", ""))
return 0
if __name__ == "__main__":
raise SystemExit(main())