Command-line IO arguments to be rationalised across subcommands
amboar opened this issue · comments
The subcommands all have different styles of input and output file specification; some take from stdin and put to stdout, some require file parameters. All-in-all, it's quite confusing and should be rationalised. The current state of affairs is listed below
$ ./bin/fpos annotate
usage: fpos annotate [-h] INPUT OUTPUT
fpos annotate: error: the following arguments are required: INPUT, OUTPUT
$ ./bin/fpos combine
usage: fpos combine [-h] [--out FILE] FILE [FILE [FILE ...]]
fpos combine: error: the following arguments are required: FILE, FILE
$ ./bin/fpos transform
usage: fpos transform [-h] [--input FILE] [--output FILE] FORM
fpos transform: error: the following arguments are required: FORM
$ ./bin/fpos visualise
usage: fpos visualise [-h] [--save SAVE]
[--graph {stacked_bar_expenses,bar_margin,box_categories,xy_categories,xy_weekly,bar_targets}]
[--current-date]
FILE
fpos visualise: error: the following arguments are required: FILE
$ ./bin/fpos window
usage: fpos window [-h] [--sink FILE] [--start DATE] [--end DATE]
[--length LENGTH]
FILE
fpos window: error: the following arguments are required: FILE
Also resolved by making these helpers plumbing rather than porcelain. Fixed with fpos update ...
and fpos show ...