Added command to re-read the timeline source.
This commit is contained in:
parent
e4a756baf5
commit
284a4159d1
Binary file not shown.
Binary file not shown.
@ -1,5 +1,5 @@
|
||||
#Thu, 08 Aug 2013 23:12:38 -0500
|
||||
#Fri, 09 Aug 2013 11:44:57 -0500
|
||||
lib.local=true
|
||||
name=timestamper-cli
|
||||
version=0.2
|
||||
build.number=13
|
||||
version=0.3
|
||||
build.number=1
|
||||
|
@ -26,7 +26,7 @@ public class TimeStamperCLI {
|
||||
public static final String VERSION = "0.1"
|
||||
|
||||
protected static def cli = [
|
||||
'v': [longOpt: 'version'],
|
||||
'v': [longOpt: 'version'],
|
||||
'd': [longOpt: 'working-directory', arguments: 1],
|
||||
't': [longOpt: 'timeline-config', arguments: 1] ]
|
||||
|
||||
@ -103,7 +103,6 @@ public class TimeStamperCLI {
|
||||
def readNotes = {
|
||||
out.println(ansi().fg(YELLOW).
|
||||
a("Notes (end with EOF or a blank line):").reset())
|
||||
out.flush();
|
||||
|
||||
String notes = ""
|
||||
String line = null
|
||||
@ -164,6 +163,11 @@ public class TimeStamperCLI {
|
||||
timelineProperties.save()
|
||||
break
|
||||
|
||||
case ~/reload/:
|
||||
timeline = timelineProperties.reloadTimeline()
|
||||
currentMarker = timeline.getLastMarker(new Date())
|
||||
break
|
||||
|
||||
default:
|
||||
String notes = readNotes()
|
||||
currentMarker = new TimelineMarker(new Date(), line, notes)
|
||||
@ -178,7 +182,7 @@ public class TimeStamperCLI {
|
||||
formatMarker(currentMarker) +
|
||||
ansi().cursorDown(1).restorCursorPosition().toString())
|
||||
out.flush();
|
||||
|
||||
|
||||
Thread.sleep(200)
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user