Command line¶
Note
The documentation in this section is aimed at people wishing to contribute to
rdial, and can be skipped if you are simply using the tool from the
command line.
Commands¶
-
rdial.cmdline.bug_data()¶ Produce data for rdial bug reports.
-
rdial.cmdline.fsck(ctx, globs, progress)¶ Check storage consistency.
- Parameters
ctx – Current command context
globs – Global options object
progress – Display progressbar
-
rdial.cmdline.start(globs, task, continue, new, time)¶ Start task.
- Parameters
globs – Global options object
task – Task name to operate on
continue_ – Pull task name from last running task
new – Create a new task
time – Task start time
-
rdial.cmdline.stop(globs, message, fname, amend)¶ Stop task.
- Parameters
globs – Global options object
message – Message to assign to event
fname – Filename to read message from
amend – Amend a previously stopped event
-
rdial.cmdline.switch(globs, task, new, time, amend, message, fname)¶ Complete last task and start new one.
- Parameters
globs – Global options object
task – Task name to operate on
new – Create a new task
time – Task start time
amend – Amend a previously stopped event
message – Message to assign to event
fname – Filename to read message from
-
rdial.cmdline.run(globs, task, new, time, message, fname, command)¶ Run command with timer.
- Parameters
globs – Global options object
task – Task name to operate on
new – Create a new task
time – Task start time
message – Message to assign to event
fname – Filename to read message from
command – Command to run
-
rdial.cmdline.wrapper(ctx, globs, time, message, fname, wrapper)¶ Run predefined command with timer.
- Parameters
ctx – Click context object
globs – Global options object
time – Task start time
message – Message to assign to event
fname – Filename to read message from
wrapper – Run wrapper to execute
-
rdial.cmdline.report(globs, task, stats, duration, sort, reverse, style)¶ Report time tracking data.
- Parameters
globs – Global options object
task – Task name to operate on
stats – Display short overview of data
duration – Time window to filter on
sort – Key to sort events on
reverse – Reverse sort order
style – Table formatting style
-
rdial.cmdline.running(globs)¶ Display running task, if any.
- Parameters
globs – Global options object
-
rdial.cmdline.last(globs)¶ Display last event, if any.
- Parameters
globs – Global options object
-
rdial.cmdline.ledger(globs, task, duration, rate)¶ Generate ledger compatible data file.
- Parameters
globs – Global options object
task – Task name to operate on
duration – Time window to filter on
rate – Rate to assign hours in report
-
rdial.cmdline.timeclock(globs, task, duration)¶ Generate ledger compatible timeclock file.
- Parameters
globs – Global options object
task – Task name to operate on
duration – Time window to filter on
Entry points¶
-
rdial.cmdline.cli(ctx, directory, backup, cache, config, interactive, colour)¶ Main command entry point.
- Parameters
ctx – Current command context
directory – Location to store event data
backup – Whether to create backup files
cache – Whether to create cache files
config – Location of config file
interactive – Whether to support interactive message editing
colour – Whether to colourise output
Command support¶
-
rdial.cmdline.filter_events(__globs, __task=None, __duration='all')[source]¶ Filter events for report processing.
- Parameters
__globs (
ROAttrDict) – Global options object__duration (
str) – Time window to filter on
- Returns
Events matching specified criteria
- Return type
CLI support¶
-
rdial.cmdline.task_from_dir(__ctx, __param, __value)[source]¶ Override task name default using name of current directory.
- Parameters
__ctx (
Context) – Current command context__param (
Option) – Parameter being processed__value (
bool) – True if flag given
- Return type
None
-
rdial.cmdline.task_option(__fun)[source]¶ Add task selection options.
Note
This is only here to reduce duplication in command setup.