Repository navigation
CLI: live JSON events for convert --json and watch --json #1076
yavuzmeteafsar
started this conversation in
Ideas
Replies: 1 comment
|
Sounds good, Yavuz, please open the PR. The shape fits what A few details so it lines up with what's there:
|
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
With
--json,filee convertprints nothing until the whole job is done, so a front end (or a script) can't show progress or tell which file finished.filee watchaccepts--jsonbut ignores it, and since it never ends, one JSON document isn't possible there anyway.Proposal, following the contract of
filee engines --json:convert --json: stdout stays one document at the end, unchanged. stderr gets one JSON object per line while the job runs:watch --json: events go to stdout, one JSON object per line:started(folder, target, output folder),file(same fields as above) andstoppedon Ctrl+C.The data is already there (
FileResult.ProgressandConversionQueue.JobUpdated), so this would stay inside Filee.Cli, withfilee help convert/filee help watchand tests updated. Existing--jsonoutput doesn't change.If this sounds good, I'd be happy to open the PR.
All reactions