lib/timetrap/cli.rb in timetrap-1.1.3 vs lib/timetrap/cli.rb in timetrap-1.2.0
- old
+ new
@@ -16,10 +16,11 @@
usage: t archive [--start DATE] [--end DATE] [SHEET]
-s, --start <date:qs> Include entries that start on this date or later
-e, --end <date:qs> Include entries that start on this date or earlier
* backend - open an sqlite shell to the database
usage: t backend
+ * configure - write out a config file. print path to config file.
* display - display the current timesheet or a specific. Pass `all' as
SHEET to display all sheets.
usage: t display [--ids] [--start DATE] [--end DATE] [--format FMT] [SHEET | all]
-v, --ids Print database ids (for use with edit)
-s, --start <date:qs> Include entries that start on this date or later
@@ -102,9 +103,14 @@
e.update :sheet => "_#{e.sheet}"
end
else
say "archive aborted!"
end
+ end
+
+ def configure
+ Config.configure!
+ say "Config file is at #{Config::PATH.inspect}"
end
def edit
entry = args['-i'] ? Entry[args['-i']] : Timetrap.active_entry
say "can't find entry" && return unless entry