You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CLI: -j/--json produces no output, and --output-dir is ignored in JSON mode #32
So with -j, the human-readable dump is correctly suppressed, the JSON is correctly generated — and then nothing is emitted.
I realize the return value is the contract for library consumers (process_onenote_file() is imported and used that way), and that part works fine. This is purely about the CLI surface: the flag is advertised as "Generate JSON output only, no dumps or prints", but as a CLI flag it currently has no observable effect.
2. --output-dir is not honored under -j
The only use of output_dir is the embedded-file extraction loop, which sits inside if not json_output::
So in JSON mode nothing is written to --output-dir — not the extracted files, and not the JSON either. Passing -o alongside -j silently does nothing.
Possible directions
Either would resolve (1); (2) depends on which you consider correct:
Emit on stdout — if args.json: print(result). Keeps -j pipeable (| jq), and leaves --output-dir legitimately unused in JSON mode (consistent with "no dumps"). Smallest change.
Write to --output-dir — e.g. <output_dir>/<section>.json, which would make -o behave consistently across modes. Note -o defaults to "./", so distinguishing "user passed -o" from the default would need a sentinel default.
Happy to send a PR for whichever you prefer — or feel free to close if the CLI -j behavior is intentional and the library return value is the only supported path.
Activity