2 Commits

2 changed files with 8 additions and 4 deletions

10
ptk.nim
View File

@ -413,7 +413,7 @@ Options:
let now = getTime().local
# Parse arguments
let args = docopt(doc, version = "ptk 0.12.1")
let args = docopt(doc, version = "ptk 0.12.3")
if args["--echo-args"]: echo $args
@ -493,6 +493,10 @@ Options:
if args["stop"]:
if timeline.marks.last.summary == STOP_MSG:
echo "ptk: no current task, nothing to stop"
quit(0)
let newMark: Mark = (
id: genUUID(),
time: if args["--time"]: parseTime($args["--time"]) else: now,
@ -505,14 +509,14 @@ Options:
timeline.writeMarks(
indices = @[timeline.marks.len - 2],
includeNotes = args["--verbose"])
echo "stopped timer"
echo "ptk: stopped timer"
saveTimeline(timeline, timelineLocation)
if args["continue"]:
if timeline.marks.last.summary != STOP_MSG:
echo "There is already something in progress:"
echo "ptk: there is already something in progress:"
timeline.writeMarks(
indices = @[timeline.marks.len - 1],
includeNotes = args["--verbose"])

View File

@ -1,6 +1,6 @@
# Package
version = "0.12.1"
version = "0.12.3"
author = "Jonathan Bernard"
description = "Personal Time Keeper"
license = "MIT"