-
Notifications
You must be signed in to change notification settings - Fork 1
/
help.txt
264 lines (180 loc) · 6.61 KB
/
help.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
$$$$$$$\ $$\
$$ __$$\ $$ |
$$ | $$ |$$\ $$\ $$$$$$$\ $$$$$$$\ $$$$$$$\
$$$$$$$ |$$ | $$ |$$ __$$\ $$ _____|$$ __$$\
$$ ____/ $$ | $$ |$$ | $$ |$$ / $$ | $$ |
$$ | $$ | $$ |$$ | $$ |$$ | $$ | $$ |
$$ | \$$$$$$ |$$ | $$ |\$$$$$$$\ $$ | $$ |
\__| \______/ \__| \__| \_______|\__| \__|
$ punch
Print current month. By default, today is highlighted in blue, the most recently
updated day in pink.
$ punch HH:MM-HH:MM HH:MM-HH:MM ...
Add blocks to today. Minutes are optional. The colon is optional when
providing minutes.
$ punch 08:00-12:00 12:30-18:00
15.02.15 08:00-12:00 12:30-18:00 Total: 09:30
Possible shorthand that does the same thing:
$ punch 8-12 1230-18
Punch recognises the following formats:
* HH:MM e.g. 09:00
* HHMM e.g. 0900
* HH e.g. 09
* H e.g. 9
* HMM e.g. 900
$ punch HH:MM
Add or complete an existing ongoing block.
$ punch 8
15.02.15 08:00- Total: 00:00
$ punch 12
15.02.15 08:00-12:00 Total: 04:00
$ punch now
Start or complete a block with the current time. Can also be used inside
of a full block punch.
Example day starting at 08:35:
$ punch now
15.02.15 08:35- Total: 00:00
At 10:35:
$ punch now
15.02.15 08:35-10:35 Total: 02:00
At 18:00:
$ punch 11-now
15.02.15 08:35-10:35 11:00-18:00 Total: 09:00
Punch rounds the time to five minutes by default with a "fair" strategy.
Meaning 08:32 gets rounded down to 08:30 and 08:33 up to 08:35. To change
that strategy set the config.punch_now_rounder option to one of the
following Symbols:
* :fair, the default behaviour described above,
* :exact, don't round at all
$ punch [card1] [card2] ...
Load card configurations before punching.
Say you have a card called "workout" that sets up a different hours folder
for you to save your workout time to:
# in .punchrc
config.cards = {
:workout => {
:hours_folder => "Users/radi/Dropbox/punch/workout"
:title => "Workout"
}
}
you can load that card and punch it with:
$ punch workout 21-22
Card names can be tab-completed when bash completion is installed.
$ punch -b, --backup path/to/backup/dir
Copy the current month's BRF file to given directory.
$ punch -b ~/Desktop
$ punch --hours, --brf
Open hours folder.
$ punch --card-config
Print card configurations.
$ punch --clear-comment, --clear-tag
Remove comment from current day.
$ punch -c, --config
Edit ~/.punchrc.
$ punch --config-reset
Reset ~/.punchrc.
$ punch --config-update
Update ~/.punchrc. Doesn't reset to default settings, but pulls newly
available settings in.
$ punch -d, --day dd.mm.yy
Pass a date to add blocks for that day.
$ punch -d 03.12.14 22-23
The following date formats are supported:
* dd.mm.yy
* dd.mm.yyyy
* dd.mm
* dd
Leading zeros may be omitted. Punch infers the month and year from the
current time and the hand_in_date setting when they are omitted.
Multiple days can be punched by passing a comma (",") separated list or
hyphen ("-") separated range of the aforementioned formats.
$ punch -d 1,3 -t Holiday
01.12.14 Total: 00:00 Holiday
03.12.14 Total: 00:00 Holiday
$ punch -d 1-3 -t Holiday
01.12.14 Total: 00:00 Holiday
02.12.14 Total: 00:00 Holiday
03.12.14 Total: 00:00 Holiday
They can be combined as well.
$ punch -d 1-3,6 -t Holiday
01.12.14 Total: 00:00 Holiday
02.12.14 Total: 00:00 Holiday
03.12.14 Total: 00:00 Holiday
06.12.14 Total: 00:00 Holiday
$ punch --dry-run
Run commands without writing to file.
$ punch -e, --edit [editor]
Edit current BRF file with your default text editor. If you're on OSX, you
may optionally pass the name of the application to open the file with.
$ punch -e "TextEdit"
You don't have to manually recalculate the totals. Use --format instead.
$ punch --edit-full [editor]
Like --edit, but fills the BRF file with all missing days.
$ punch -f, --format
Reformat current BRF file. This will normalize whitespace, recalculate
totals and remove ongoing blocks.
$ punch --full
Print all days instead of the ones with blocks only.
$ punch -h , --help
Print this message.
$ punch -l, --log [entries]
List the last 10 commit messages. Optionally pass a number to list more.
$ punch --mail
Send an email with the current BRF file attached.
$ punch -m, --month [month]
Load specific month of current year. To punch February for instance:
$ punch --month 2
The year can optionally be specified by appending ".<yy>". E.g. to punch
February 2015:
$ punch --month 2.15
$ punch -n, --next
Punch next month.
$ punch -p, --previous
Punch previous month.
$ punch --raw
Print current BRF file without fancy highlighting and auto-formatting.
$ punch -r, --remove HH:MM-HH:MM
Remove the given block. Requires a full block and can be used to cut holes
into existing blocks.
$ punch -s, --stats
Print some stats.
Days with comments that contain any of the keywords provided in the
"ignore_tags" config will be ignored.
$ punch -t, --tag, --comment [comment]
Add a comment to the end of the line. A comment may not contain any
newlines.
$ punch 9-1730 --comment "support for company X"
15.02.15 09:00-17:30 Total: 09:00 support for company X
When given no argument, you can create/edit a comment with the configured
text editor.
$ punch -u, --update
Update this script. (Given you installed it via git-clone)
$ punch -v, --version
Print commit hash of the current version.
$ punch --year [year]
Punch specific year of current month. To punch the current month in 2014:
$ punch --year 2014
or
$ punch --year 14
$ punch -y, --yesterday
Add blocks to yesterday.
$ punch -y 12-13
= DEV COMMANDS ================================================================
To run these, install the dev dependencies specified in Gemfile with
$ bundle
$ punch --console
Start pry session after internal Month instance has been initialized.
$ punch --coverage
Open test coverage stats in default browser.
$ punch --diagram
Generate and open a class diagram.
$ punch --doc
Generate and view docs in default browser.
$ punch --github
Open GitHub page.
$ punch --hack
Edit this script.
$ punch --profile
Profile and print results.
$ punch --test
Run tests.