Refresh handoff and harden daily report (#3)
CI / skip-ci-check (push) Successful in 17s
CI / secret-scan (push) Successful in 8s
CI / python-ci (push) Successful in 27s

This commit was merged in pull request #3.
This commit is contained in:
2026-07-12 10:26:17 -05:00
parent 5c0385e27c
commit 5d1fc601ea
4 changed files with 203 additions and 6 deletions
+9 -1
View File
@@ -43,6 +43,12 @@ def main():
action="store_true",
help="Test SMTP connection before sending",
)
parser.add_argument(
"--lookback-days",
type=int,
default=1,
help="Include trades filed in the last N days ending on the report date (default: 1)",
)
parser.add_argument(
"--save-to-file",
help="Also save report to this file path",
@@ -81,7 +87,9 @@ def main():
logger.info(f"Generating daily report for {report_date or date.today()}...")
with get_session() as session:
generator = ReportGenerator(session)
report_data = generator.generate_daily_summary(report_date)
report_data = generator.generate_daily_summary(
report_date, lookback_days=args.lookback_days
)
# Format as text and HTML
text_body = generator.format_as_text(report_data, "daily")