Adds --print-fio-table flag to fuj sync; only fires when --dry-run is also set
Prints an aligned tabwriter table of every Fio transaction in the look-back window with a STATUS column (NEW = would be appended, DUP = already in sheet)
Refactors Sync ID computation into a single pre-pass shared by both the table printer and the row builder, eliminating duplication
fuj sync --dry-run --print-fio-table --days 30 — table prints with DATE/AMOUNT/SENDER/VS/MESSAGE/BANKID/STATUS columns; NEW count matches the "would sync N" summary
fuj sync --print-fio-table --days 1 (no --dry-run) — table silently suppressed, real sync proceeds normally
## Summary
- Adds `--print-fio-table` flag to `fuj sync`; only fires when `--dry-run` is also set
- Prints an aligned `tabwriter` table of every Fio transaction in the look-back window with a `STATUS` column (`NEW` = would be appended, `DUP` = already in sheet)
- Refactors Sync ID computation into a single pre-pass shared by both the table printer and the row builder, eliminating duplication
## New file
`go/internal/services/banksync/fio_table.go` — `printFioTable` + `truncRunes` helpers
## Test plan
- [ ] `cd go && go build ./... && go test ./...` — all pass
- [ ] `fuj sync --dry-run --days 30` — existing output unchanged (no table)
- [ ] `fuj sync --dry-run --print-fio-table --days 30` — table prints with DATE/AMOUNT/SENDER/VS/MESSAGE/BANKID/STATUS columns; NEW count matches the "would sync N" summary
- [ ] `fuj sync --print-fio-table --days 1` (no --dry-run) — table silently suppressed, real sync proceeds normally
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Prints an aligned tabwriter table of every Fio transaction in the
look-back window, with a STATUS column showing NEW (would be appended)
or DUP (already in sheet). Only fires when --dry-run is also set, so
it can't affect real syncs. Refactors Sync ID computation into a single
pre-pass shared by both the table printer and the row builder.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Wires slog.SetDefault to honour LOG_LEVEL in all CLI commands and adds
debug logs on the Fio fetch path so a silent "fetched 0 transaction(s)"
can be diagnosed without code changes:
- fio.New: which client variant (api/transparent) was selected
- apiClient: GET URL (token redacted as ****), HTTP status, body bytes,
parsed transaction count
- transparentClient: GET URL, HTTP status, body bytes, plus parser
stats (raw rows from second table, kept, dropped_bad_date,
dropped_nonpositive_amount)
Also suppresses the --print-fio-table block when zero transactions were
fetched, so the bare header no longer prints under that condition.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Wraps `LOG_LEVEL=DEBUG ./bin/fuj sync -dry-run -print-fio-table -days N`
behind a single make target. Default DAYS=30, override with
`make go-sync-debug DAYS=90`. Builds the Go binary first via go-build.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Fio's transparent account page now serves dates as DD.MM.YY (e.g.
07.05.26) rather than the previously expected 4-digit-year format.
Extends parseCzechDate to try all eight layout variants: padded and
non-padded, dot and slash separators, 4-digit and 2-digit years.
Go maps 2-digit year 00-68 → 2000-2068, so 26 → 2026.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
kacerr
merged commit 2164e99866 into main2026-05-07 14:13:20 +02:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
--print-fio-tableflag tofuj sync; only fires when--dry-runis also settabwritertable of every Fio transaction in the look-back window with aSTATUScolumn (NEW= would be appended,DUP= already in sheet)New file
go/internal/services/banksync/fio_table.go—printFioTable+truncRuneshelpersTest plan
cd go && go build ./... && go test ./...— all passfuj sync --dry-run --days 30— existing output unchanged (no table)fuj sync --dry-run --print-fio-table --days 30— table prints with DATE/AMOUNT/SENDER/VS/MESSAGE/BANKID/STATUS columns; NEW count matches the "would sync N" summaryfuj sync --print-fio-table --days 1(no --dry-run) — table silently suppressed, real sync proceeds normally🤖 Generated with Claude Code