Brett Smith
95f7524b00
cliutil: Add ExtendAction.
...
This is a user affordance we've wanted for a while, and
query-report *really* wants it.
2021-02-24 15:31:23 -05:00
Brett Smith
5231a1784f
cliutil: EnumArgument matches user arguments against aliases.
2021-02-24 13:15:33 -05:00
Brett Smith
0a34ed6798
cliutil: ExceptHook catches RewriteRuleError.
...
Now that we have richer exceptions, this is the easiest way to refactor out
rewrite rule error handling from the various main functions where it
currenly lives.
2021-02-24 13:15:33 -05:00
Brett Smith
4188dc6a64
cliutil: Add EnumArgument.
...
This functionality already existed in the code three times, and it's about
to get more important for the ledger report, so now was the time to abstract
it.
2021-02-17 14:00:06 -05:00
Brett Smith
902c313b4d
cliutil: New function can_run.
2021-01-09 10:09:08 -05:00
Brett Smith
1b7fdf4f3b
Clarify and organize license info including additional permission.
2021-01-08 16:58:04 -05:00
Brett Smith
8597a526d7
cliutil: Use semi-standardized BSD exit codes.
2020-07-30 15:53:31 -04:00
Brett Smith
a27d68beab
cliutil: Add diff_year function.
2020-07-27 11:50:11 -04:00
Brett Smith
b038ec827c
cliutil: Add year_or_date_arg() function.
2020-06-25 08:43:28 -04:00
Brett Smith
7660700e6c
cliutil: Add date_arg() function.
...
Meant to be used as an argument type.
2020-06-15 18:11:39 -04:00
Brett Smith
cd578289c4
cliutil: Add make_entry_point() function.
...
This provides better logging setup, reduces the amount of boilerplate in
main, and replaces is_main_script().
2020-06-12 15:08:08 -04:00
Brett Smith
2b5cb0eca6
cliutil: Add bytes_output() and text_output() functions.
2020-06-09 09:04:27 -04:00
Brett Smith
32b62df540
cliutil: Better implementation of is_main_script.
...
The old one could return True if you called accrual.main()
directly from one-off test scripts.
2020-05-29 23:39:27 -04:00
Brett Smith
3fbd05d553
cliutil: Add is_main_script function.
2020-05-29 22:05:26 -04:00
Brett Smith
2b550a2037
cliutil: Start module.
...
We're probably going to have a small handful of reporting tools.
This module has all the stuff I end up putting in all of them.
2020-05-29 22:05:26 -04:00