module Timetrap module CLI extend Helpers attr_accessor :args extend self USAGE = <<-EOF Timetrap - Simple Time Tracking Usage: #{File.basename $0} COMMAND [OPTIONS] [ARGS...] COMMAND can be abbreviated. For example `t in` and `t i` are equivalent. COMMAND is one of: * archive - Move entries to a hidden sheet (by default named '_[SHEET]') so they're out of the way. usage: t archive [--start DATE] [--end DATE] [SHEET] -s, --start Include entries that start on this date or later -e, --end Include entries that start on this date or earlier * backend - Open an sqlite shell to the database. usage: t backend * configure - Write out a YAML config file. Print path to config file. The file may contain ERB. usage: t configure Currently supported options are: round_in_seconds: The duration of time to use for rounding with the -r flag database_file: The file path of the sqlite database append_notes_delimiter: delimiter used when appending notes via t edit --append formatter_search_paths: an array of directories to search for user defined fomatter classes default_formatter: The format to use when display is invoked without a `--format` option default_command: The default command to run when calling t. auto_checkout: Automatically check out of running entries when you check in * display - Display the current timesheet or a specific. Pass `all' as SHEET to display all unarchived sheets or `full' to display archived and unarchived sheets. usage: t display [--ids] [--start DATE] [--end DATE] [--format FMT] [SHEET | all | full] -v, --ids Print database ids (for use with edit) -s, --start Include entries that start on this date or later -e, --end Include entries that start on this date or earlier -f, --format The output format. Valid built-in formats are ical, csv, json, ids, factor, and text (default). Documentation on defining custom formats can be found in the README included in this distribution. * edit - Alter an entry's note, start, or end time. Defaults to the active entry. Defaults to the last entry to be checked out of if no entry is active. usage: t edit [--id ID] [--start TIME] [--end TIME] [--append] [NOTES] -i, --id Alter entry with id instead of the running entry -s, --start Change the start time to