doing 1.0.92 → 2.0.5.pre

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHORS +19 -0
  3. data/CHANGELOG.md +596 -0
  4. data/COMMANDS.md +1181 -0
  5. data/Gemfile +2 -0
  6. data/Gemfile.lock +110 -0
  7. data/LICENSE +23 -0
  8. data/README.md +15 -699
  9. data/Rakefile +79 -0
  10. data/_config.yml +1 -0
  11. data/bin/doing +1012 -486
  12. data/doing.fish +278 -0
  13. data/doing.gemspec +34 -0
  14. data/doing.rdoc +1759 -0
  15. data/example_plugin.rb +209 -0
  16. data/generate_completions.sh +4 -0
  17. data/img/doing-colors.jpg +0 -0
  18. data/img/doing-printf-wrap-800.jpg +0 -0
  19. data/img/doing-show-note-formatting-800.jpg +0 -0
  20. data/lib/completion/_doing.zsh +151 -0
  21. data/lib/completion/doing.bash +416 -0
  22. data/lib/completion/doing.fish +278 -0
  23. data/lib/doing/array.rb +8 -0
  24. data/lib/doing/cli_status.rb +66 -0
  25. data/lib/doing/colors.rb +136 -0
  26. data/lib/doing/configuration.rb +312 -0
  27. data/lib/doing/errors.rb +102 -0
  28. data/lib/doing/hash.rb +31 -0
  29. data/lib/doing/hooks.rb +59 -0
  30. data/lib/doing/item.rb +155 -0
  31. data/lib/doing/log_adapter.rb +342 -0
  32. data/lib/doing/markdown_document_listener.rb +174 -0
  33. data/lib/doing/note.rb +59 -0
  34. data/lib/doing/pager.rb +95 -0
  35. data/lib/doing/plugin_manager.rb +208 -0
  36. data/lib/doing/plugins/export/csv_export.rb +48 -0
  37. data/lib/doing/plugins/export/html_export.rb +83 -0
  38. data/lib/doing/plugins/export/json_export.rb +140 -0
  39. data/lib/doing/plugins/export/markdown_export.rb +85 -0
  40. data/lib/doing/plugins/export/taskpaper_export.rb +34 -0
  41. data/lib/doing/plugins/export/template_export.rb +141 -0
  42. data/lib/doing/plugins/import/cal_to_json.scpt +0 -0
  43. data/lib/doing/plugins/import/calendar_import.rb +76 -0
  44. data/lib/doing/plugins/import/doing_import.rb +144 -0
  45. data/lib/doing/plugins/import/timing_import.rb +78 -0
  46. data/lib/doing/string.rb +347 -0
  47. data/lib/doing/symbol.rb +16 -0
  48. data/lib/doing/time.rb +18 -0
  49. data/lib/doing/util.rb +186 -0
  50. data/lib/doing/version.rb +1 -1
  51. data/lib/doing/wwid.rb +1868 -2356
  52. data/lib/doing/wwidfile.rb +117 -0
  53. data/lib/doing.rb +44 -4
  54. data/lib/examples/commands/wiki.rb +81 -0
  55. data/lib/examples/plugins/hooks.rb +22 -0
  56. data/lib/examples/plugins/say_export.rb +202 -0
  57. data/lib/examples/plugins/templates/wiki.css +169 -0
  58. data/lib/examples/plugins/templates/wiki.haml +27 -0
  59. data/lib/examples/plugins/templates/wiki_index.haml +18 -0
  60. data/lib/examples/plugins/wiki_export.rb +87 -0
  61. data/lib/templates/doing-markdown.erb +5 -0
  62. data/man/doing.1 +964 -0
  63. data/man/doing.1.html +711 -0
  64. data/man/doing.1.ronn +600 -0
  65. data/package-lock.json +3 -0
  66. data/rdoc_to_mmd.rb +42 -0
  67. data/rdocfixer.rb +13 -0
  68. data/scripts/generate_bash_completions.rb +210 -0
  69. data/scripts/generate_fish_completions.rb +201 -0
  70. data/scripts/generate_zsh_completions.rb +164 -0
  71. metadata +82 -7
  72. data/lib/doing/helpers.rb +0 -191
  73. data/lib/doing/markdown_export.rb +0 -16
@@ -0,0 +1,416 @@
1
+ _doing_again() {
2
+
3
+ if [[ "$token" == --* ]]; then
4
+ COMPREPLY=( $( compgen -W '--bool --editor --in --note --section --search --tag' -- $token ) )
5
+ elif [[ "$token" == -* ]]; then
6
+ COMPREPLY=( $( compgen -W '-e -n -s --bool --editor --in --note --section --search --tag' -- $token ) )
7
+
8
+ fi
9
+ }
10
+
11
+ _doing_archive() {
12
+ OLD_IFS="$IFS"
13
+ local token=${COMP_WORDS[$COMP_CWORD]}
14
+ IFS=$' '
15
+ local words=$(doing sections)
16
+ IFS="$OLD_IFS"
17
+
18
+ if [[ "$token" == --* ]]; then
19
+ COMPREPLY=( $( compgen -W '--before --bool --keep --label --search --to --tag' -- $token ) )
20
+ elif [[ "$token" == -* ]]; then
21
+ COMPREPLY=( $( compgen -W '-k -t --before --bool --keep --label --search --to --tag' -- $token ) )
22
+ else
23
+ local nocasematchWasOff=0
24
+ shopt nocasematch >/dev/null || nocasematchWasOff=1
25
+ (( nocasematchWasOff )) && shopt -s nocasematch
26
+ local w matches=()
27
+ OLD_IFS="$IFS"
28
+ IFS=$' '‰
29
+ for w in $words; do
30
+ if [[ "$w" == "$token"* ]]; then
31
+ matches+=("${w// / }")
32
+ fi
33
+ done
34
+ IFS="$OLD_IFS"
35
+ (( nocasematchWasOff )) && shopt -u nocasematch
36
+ COMPREPLY=("${matches[@]}")
37
+
38
+ fi
39
+ }
40
+
41
+ _doing_cancel() {
42
+
43
+ if [[ "$token" == --* ]]; then
44
+ COMPREPLY=( $( compgen -W '--archive --bool --section --tag --unfinished' -- $token ) )
45
+ elif [[ "$token" == -* ]]; then
46
+ COMPREPLY=( $( compgen -W '-a -s -u --archive --bool --section --tag --unfinished' -- $token ) )
47
+
48
+ fi
49
+ }
50
+
51
+ _doing_config() {
52
+
53
+ if [[ "$token" == --* ]]; then
54
+ COMPREPLY=( $( compgen -W '--editor --update' -- $token ) )
55
+ elif [[ "$token" == -* ]]; then
56
+ COMPREPLY=( $( compgen -W '-e -u --editor --update' -- $token ) )
57
+
58
+ fi
59
+ }
60
+
61
+ _doing_done() {
62
+
63
+ if [[ "$token" == --* ]]; then
64
+ COMPREPLY=( $( compgen -W '--archive --at --back --date --editor --remove --section --took' -- $token ) )
65
+ elif [[ "$token" == -* ]]; then
66
+ COMPREPLY=( $( compgen -W '-a -b -e -r -s -t --archive --at --back --date --editor --remove --section --took' -- $token ) )
67
+
68
+ fi
69
+ }
70
+
71
+ _doing_finish() {
72
+
73
+ if [[ "$token" == --* ]]; then
74
+ COMPREPLY=( $( compgen -W '--archive --at --auto --back --bool --date --section --search --took --tag --unfinished' -- $token ) )
75
+ elif [[ "$token" == -* ]]; then
76
+ COMPREPLY=( $( compgen -W '-a -b -s -t -u --archive --at --auto --back --bool --date --section --search --took --tag --unfinished' -- $token ) )
77
+
78
+ fi
79
+ }
80
+
81
+ _doing_grep() {
82
+
83
+ if [[ "$token" == --* ]]; then
84
+ COMPREPLY=( $( compgen -W '--after --before --interactive --output --only_timed --section --times --tag_sort --totals' -- $token ) )
85
+ elif [[ "$token" == -* ]]; then
86
+ COMPREPLY=( $( compgen -W '-i -o -s -t --after --before --interactive --output --only_timed --section --times --tag_sort --totals' -- $token ) )
87
+
88
+ fi
89
+ }
90
+
91
+ _doing_help() {
92
+
93
+ if [[ "$token" == --* ]]; then
94
+ COMPREPLY=( $( compgen -W '' -- $token ) )
95
+ elif [[ "$token" == -* ]]; then
96
+ COMPREPLY=( $( compgen -W ' ' -- $token ) )
97
+
98
+ fi
99
+ }
100
+
101
+ _doing_import() {
102
+
103
+ if [[ "$token" == --* ]]; then
104
+ COMPREPLY=( $( compgen -W '--after --autotag --before --from --only_timed --overlap --prefix --section --search --tag --type' -- $token ) )
105
+ elif [[ "$token" == -* ]]; then
106
+ COMPREPLY=( $( compgen -W '-f -s --after --autotag --before --from --only_timed --overlap --prefix --section --search --tag --type' -- $token ) )
107
+
108
+ fi
109
+ }
110
+
111
+ _doing_last() {
112
+
113
+ if [[ "$token" == --* ]]; then
114
+ COMPREPLY=( $( compgen -W '--bool --editor --section --search --tag' -- $token ) )
115
+ elif [[ "$token" == -* ]]; then
116
+ COMPREPLY=( $( compgen -W '-e -s --bool --editor --section --search --tag' -- $token ) )
117
+
118
+ fi
119
+ }
120
+
121
+ _doing_later() {
122
+
123
+ if [[ "$token" == --* ]]; then
124
+ COMPREPLY=( $( compgen -W '--back --editor --note' -- $token ) )
125
+ elif [[ "$token" == -* ]]; then
126
+ COMPREPLY=( $( compgen -W '-b -e -n --back --editor --note' -- $token ) )
127
+
128
+ fi
129
+ }
130
+
131
+ _doing_mark() {
132
+
133
+ if [[ "$token" == --* ]]; then
134
+ COMPREPLY=( $( compgen -W '--remove --section --unfinished' -- $token ) )
135
+ elif [[ "$token" == -* ]]; then
136
+ COMPREPLY=( $( compgen -W '-r -s -u --remove --section --unfinished' -- $token ) )
137
+
138
+ fi
139
+ }
140
+
141
+ _doing_meanwhile() {
142
+
143
+ if [[ "$token" == --* ]]; then
144
+ COMPREPLY=( $( compgen -W '--archive --back --editor --note --section' -- $token ) )
145
+ elif [[ "$token" == -* ]]; then
146
+ COMPREPLY=( $( compgen -W '-a -b -e -n -s --archive --back --editor --note --section' -- $token ) )
147
+
148
+ fi
149
+ }
150
+
151
+ _doing_note() {
152
+
153
+ if [[ "$token" == --* ]]; then
154
+ COMPREPLY=( $( compgen -W '--editor --remove --section' -- $token ) )
155
+ elif [[ "$token" == -* ]]; then
156
+ COMPREPLY=( $( compgen -W '-e -r -s --editor --remove --section' -- $token ) )
157
+
158
+ fi
159
+ }
160
+
161
+ _doing_now() {
162
+
163
+ if [[ "$token" == --* ]]; then
164
+ COMPREPLY=( $( compgen -W '--back --editor --finish_last --note --section' -- $token ) )
165
+ elif [[ "$token" == -* ]]; then
166
+ COMPREPLY=( $( compgen -W '-b -e -f -n -s --back --editor --finish_last --note --section' -- $token ) )
167
+
168
+ fi
169
+ }
170
+
171
+ _doing_on() {
172
+
173
+ if [[ "$token" == --* ]]; then
174
+ COMPREPLY=( $( compgen -W '--output --section --times --tag_sort --totals' -- $token ) )
175
+ elif [[ "$token" == -* ]]; then
176
+ COMPREPLY=( $( compgen -W '-o -s -t --output --section --times --tag_sort --totals' -- $token ) )
177
+
178
+ fi
179
+ }
180
+
181
+ _doing_open() {
182
+
183
+ if [[ "$token" == --* ]]; then
184
+ COMPREPLY=( $( compgen -W '--app --bundle_id --editor' -- $token ) )
185
+ elif [[ "$token" == -* ]]; then
186
+ COMPREPLY=( $( compgen -W '-a -b -e --app --bundle_id --editor' -- $token ) )
187
+
188
+ fi
189
+ }
190
+
191
+ _doing_plugins() {
192
+
193
+ if [[ "$token" == --* ]]; then
194
+ COMPREPLY=( $( compgen -W '--column --type' -- $token ) )
195
+ elif [[ "$token" == -* ]]; then
196
+ COMPREPLY=( $( compgen -W '-c -t --column --type' -- $token ) )
197
+
198
+ fi
199
+ }
200
+
201
+ _doing_recent() {
202
+
203
+ if [[ "$token" == --* ]]; then
204
+ COMPREPLY=( $( compgen -W '--section --times --tag_sort --totals' -- $token ) )
205
+ elif [[ "$token" == -* ]]; then
206
+ COMPREPLY=( $( compgen -W '-s -t --section --times --tag_sort --totals' -- $token ) )
207
+
208
+ fi
209
+ }
210
+
211
+ _doing_rotate() {
212
+
213
+ if [[ "$token" == --* ]]; then
214
+ COMPREPLY=( $( compgen -W '--before --bool --keep --section --search --tag' -- $token ) )
215
+ elif [[ "$token" == -* ]]; then
216
+ COMPREPLY=( $( compgen -W '-k -s --before --bool --keep --section --search --tag' -- $token ) )
217
+
218
+ fi
219
+ }
220
+
221
+ _doing_sections() {
222
+
223
+ if [[ "$token" == --* ]]; then
224
+ COMPREPLY=( $( compgen -W '--column' -- $token ) )
225
+ elif [[ "$token" == -* ]]; then
226
+ COMPREPLY=( $( compgen -W '-c --column' -- $token ) )
227
+
228
+ fi
229
+ }
230
+
231
+ _doing_select() {
232
+
233
+ if [[ "$token" == --* ]]; then
234
+ COMPREPLY=( $( compgen -W '--archive --cancel --delete --editor --finish --flag --force --move --menu --output --query --remove --section --save_to --tag' -- $token ) )
235
+ elif [[ "$token" == -* ]]; then
236
+ COMPREPLY=( $( compgen -W '-a -c -d -e -f -m -o -q -r -s -t --archive --cancel --delete --editor --finish --flag --force --move --menu --output --query --remove --section --save_to --tag' -- $token ) )
237
+
238
+ fi
239
+ }
240
+
241
+ _doing_show() {
242
+ OLD_IFS="$IFS"
243
+ local token=${COMP_WORDS[$COMP_CWORD]}
244
+ IFS=$' '
245
+ local words=$(doing sections)
246
+ IFS="$OLD_IFS"
247
+
248
+ if [[ "$token" == --* ]]; then
249
+ COMPREPLY=( $( compgen -W '--age --after --bool --before --count --from --output --only_timed --sort --search --times --tag --tag_order --tag_sort --totals' -- $token ) )
250
+ elif [[ "$token" == -* ]]; then
251
+ COMPREPLY=( $( compgen -W '-a -b -c -f -o -s -t --age --after --bool --before --count --from --output --only_timed --sort --search --times --tag --tag_order --tag_sort --totals' -- $token ) )
252
+ else
253
+ local nocasematchWasOff=0
254
+ shopt nocasematch >/dev/null || nocasematchWasOff=1
255
+ (( nocasematchWasOff )) && shopt -s nocasematch
256
+ local w matches=()
257
+ OLD_IFS="$IFS"
258
+ IFS=$' '‰
259
+ for w in $words; do
260
+ if [[ "$w" == "$token"* ]]; then
261
+ matches+=("${w// / }")
262
+ fi
263
+ done
264
+ IFS="$OLD_IFS"
265
+ (( nocasematchWasOff )) && shopt -u nocasematch
266
+ COMPREPLY=("${matches[@]}")
267
+
268
+ fi
269
+ }
270
+
271
+ _doing_since() {
272
+
273
+ if [[ "$token" == --* ]]; then
274
+ COMPREPLY=( $( compgen -W '--output --section --times --tag_sort --totals' -- $token ) )
275
+ elif [[ "$token" == -* ]]; then
276
+ COMPREPLY=( $( compgen -W '-o -s -t --output --section --times --tag_sort --totals' -- $token ) )
277
+
278
+ fi
279
+ }
280
+
281
+ _doing_tag() {
282
+
283
+ if [[ "$token" == --* ]]; then
284
+ COMPREPLY=( $( compgen -W '--autotag --bool --count --date --force --remove --regex --rename --section --search --tag --unfinished' -- $token ) )
285
+ elif [[ "$token" == -* ]]; then
286
+ COMPREPLY=( $( compgen -W '-a -c -d -r -s -u --autotag --bool --count --date --force --remove --regex --rename --section --search --tag --unfinished' -- $token ) )
287
+
288
+ fi
289
+ }
290
+
291
+ _doing_template() {
292
+
293
+ if [[ "$token" == --* ]]; then
294
+ COMPREPLY=( $( compgen -W '--list' -- $token ) )
295
+ elif [[ "$token" == -* ]]; then
296
+ COMPREPLY=( $( compgen -W '-l --list' -- $token ) )
297
+
298
+ fi
299
+ }
300
+
301
+ _doing_today() {
302
+
303
+ if [[ "$token" == --* ]]; then
304
+ COMPREPLY=( $( compgen -W '--after --before --output --section --times --tag_sort --totals' -- $token ) )
305
+ elif [[ "$token" == -* ]]; then
306
+ COMPREPLY=( $( compgen -W '-o -s -t --after --before --output --section --times --tag_sort --totals' -- $token ) )
307
+
308
+ fi
309
+ }
310
+
311
+ _doing_undo() {
312
+
313
+ if [[ "$token" == --* ]]; then
314
+ COMPREPLY=( $( compgen -W '--file' -- $token ) )
315
+ elif [[ "$token" == -* ]]; then
316
+ COMPREPLY=( $( compgen -W '-f --file' -- $token ) )
317
+
318
+ fi
319
+ }
320
+
321
+ _doing_view() {
322
+ OLD_IFS="$IFS"
323
+ local token=${COMP_WORDS[$COMP_CWORD]}
324
+ IFS=$' '
325
+ local words=$(doing views)
326
+ IFS="$OLD_IFS"
327
+
328
+ if [[ "$token" == --* ]]; then
329
+ COMPREPLY=( $( compgen -W '--after --bool --before --count --color --output --only_timed --section --search --times --tag --tag_order --tag_sort --totals' -- $token ) )
330
+ elif [[ "$token" == -* ]]; then
331
+ COMPREPLY=( $( compgen -W '-b -c -o -s -t --after --bool --before --count --color --output --only_timed --section --search --times --tag --tag_order --tag_sort --totals' -- $token ) )
332
+ else
333
+ local nocasematchWasOff=0
334
+ shopt nocasematch >/dev/null || nocasematchWasOff=1
335
+ (( nocasematchWasOff )) && shopt -s nocasematch
336
+ local w matches=()
337
+ OLD_IFS="$IFS"
338
+ IFS=$' '‰
339
+ for w in $words; do
340
+ if [[ "$w" == "$token"* ]]; then
341
+ matches+=("${w// / }")
342
+ fi
343
+ done
344
+ IFS="$OLD_IFS"
345
+ (( nocasematchWasOff )) && shopt -u nocasematch
346
+ COMPREPLY=("${matches[@]}")
347
+
348
+ fi
349
+ }
350
+
351
+ _doing_views() {
352
+
353
+ if [[ "$token" == --* ]]; then
354
+ COMPREPLY=( $( compgen -W '--column' -- $token ) )
355
+ elif [[ "$token" == -* ]]; then
356
+ COMPREPLY=( $( compgen -W '-c --column' -- $token ) )
357
+
358
+ fi
359
+ }
360
+
361
+ _doing_yesterday() {
362
+
363
+ if [[ "$token" == --* ]]; then
364
+ COMPREPLY=( $( compgen -W '--after --before --output --section --times --tag_order --tag_sort --totals' -- $token ) )
365
+ elif [[ "$token" == -* ]]; then
366
+ COMPREPLY=( $( compgen -W '-o -s -t --after --before --output --section --times --tag_order --tag_sort --totals' -- $token ) )
367
+
368
+ fi
369
+ }
370
+
371
+ _doing()
372
+ {
373
+ local last="${@: -1}"
374
+ local token=${COMP_WORDS[$COMP_CWORD]}
375
+
376
+ if [[ $last =~ (again|resume) ]]; then _doing_again
377
+ elif [[ $last =~ (archive) ]]; then _doing_archive
378
+ elif [[ $last =~ (cancel) ]]; then _doing_cancel
379
+ elif [[ $last =~ (config) ]]; then _doing_config
380
+ elif [[ $last =~ (done|did) ]]; then _doing_done
381
+ elif [[ $last =~ (finish) ]]; then _doing_finish
382
+ elif [[ $last =~ (grep|search) ]]; then _doing_grep
383
+ elif [[ $last =~ (help) ]]; then _doing_help
384
+ elif [[ $last =~ (import) ]]; then _doing_import
385
+ elif [[ $last =~ (last) ]]; then _doing_last
386
+ elif [[ $last =~ (later) ]]; then _doing_later
387
+ elif [[ $last =~ (mark|flag) ]]; then _doing_mark
388
+ elif [[ $last =~ (meanwhile) ]]; then _doing_meanwhile
389
+ elif [[ $last =~ (note) ]]; then _doing_note
390
+ elif [[ $last =~ (now|next) ]]; then _doing_now
391
+ elif [[ $last =~ (on) ]]; then _doing_on
392
+ elif [[ $last =~ (open) ]]; then _doing_open
393
+ elif [[ $last =~ (plugins) ]]; then _doing_plugins
394
+ elif [[ $last =~ (recent) ]]; then _doing_recent
395
+ elif [[ $last =~ (rotate) ]]; then _doing_rotate
396
+ elif [[ $last =~ (sections) ]]; then _doing_sections
397
+ elif [[ $last =~ (select) ]]; then _doing_select
398
+ elif [[ $last =~ (show) ]]; then _doing_show
399
+ elif [[ $last =~ (since) ]]; then _doing_since
400
+ elif [[ $last =~ (tag) ]]; then _doing_tag
401
+ elif [[ $last =~ (template) ]]; then _doing_template
402
+ elif [[ $last =~ (today) ]]; then _doing_today
403
+ elif [[ $last =~ (undo) ]]; then _doing_undo
404
+ elif [[ $last =~ (view) ]]; then _doing_view
405
+ elif [[ $last =~ (views) ]]; then _doing_views
406
+ elif [[ $last =~ (yesterday) ]]; then _doing_yesterday
407
+ else
408
+ OLD_IFS="$IFS"
409
+ IFS=$'
410
+ '
411
+ COMPREPLY=( $(compgen -W "$(doing help -c)" -- $token) )
412
+ IFS="$OLD_IFS"
413
+ fi
414
+ }
415
+
416
+ complete -F _doing doing