samg-timetrap 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +9 -2
- data/VERSION.yml +1 -1
- data/lib/timetrap/cli.rb +7 -0
- metadata +2 -2
data/README.md
CHANGED
@@ -2,8 +2,10 @@ Timetrap
|
|
2
2
|
========
|
3
3
|
|
4
4
|
Timetrap is a ruby port of Trevor Caira's Timebook, a small utility which aims
|
5
|
-
to be a low-overhead way of tracking what you spend time on.
|
6
|
-
|
5
|
+
to be a low-overhead way of tracking what you spend time on. It contains
|
6
|
+
several enhancement over Timebook notably the ability to parse natural language
|
7
|
+
time strings. This makes commands such as ``t in --at "30 minutes ago"``
|
8
|
+
possible. Timetrap maintains its state in a sqlite3 database.
|
7
9
|
|
8
10
|
To install:
|
9
11
|
|
@@ -155,3 +157,8 @@ Commands
|
|
155
157
|
|
156
158
|
usage: ``t switch TIMESHEET``
|
157
159
|
|
160
|
+
**week**
|
161
|
+
Shortcut for display with start date set to monday of this week
|
162
|
+
|
163
|
+
usage: ``t week [--ids] [--end DATE] [--format FMT] [SHEET | all]``
|
164
|
+
|
data/VERSION.yml
CHANGED
data/lib/timetrap/cli.rb
CHANGED
@@ -44,6 +44,8 @@ where COMMAND is one of:
|
|
44
44
|
usage: t running
|
45
45
|
* switch - switch to a new timesheet
|
46
46
|
usage: t switch TIMESHEET
|
47
|
+
* week - shortcut for display with start date set to monday of this week
|
48
|
+
usage: t week [--ids] [--end DATE] [--format FMT] [SHEET | all]
|
47
49
|
|
48
50
|
OTHER OPTIONS
|
49
51
|
-h, --help Display this help
|
@@ -207,6 +209,11 @@ where COMMAND is one of:
|
|
207
209
|
say Timetrap::Entry.filter(:end => nil).map{|e| " #{e.sheet}: #{e.note}"}.uniq.sort
|
208
210
|
end
|
209
211
|
|
212
|
+
def week
|
213
|
+
args['-s'] = Date.today.wday == 1 ? Date.today.to_s : Date.parse(Chronic.parse(%q(last monday)).to_s).to_s
|
214
|
+
display
|
215
|
+
end
|
216
|
+
|
210
217
|
private
|
211
218
|
|
212
219
|
def unused_args
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: samg-timetrap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sam Goldstein
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-04-
|
12
|
+
date: 2009-04-30 00:00:00 -07:00
|
13
13
|
default_executable: t
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|