doing 2.0.3.pre → 2.0.8.pre

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +40 -1
  3. data/Gemfile.lock +1 -1
  4. data/README.md +1 -1
  5. data/bin/doing +316 -114
  6. data/doing.rdoc +244 -19
  7. data/example_plugin.rb +1 -1
  8. data/generate_completions.sh +1 -0
  9. data/lib/completion/_doing.zsh +179 -127
  10. data/lib/completion/doing.bash +60 -27
  11. data/lib/completion/doing.fish +74 -23
  12. data/lib/doing/cli_status.rb +4 -0
  13. data/lib/doing/configuration.rb +2 -0
  14. data/lib/doing/errors.rb +22 -15
  15. data/lib/doing/item.rb +12 -11
  16. data/lib/doing/log_adapter.rb +27 -25
  17. data/lib/doing/plugin_manager.rb +1 -1
  18. data/lib/doing/plugins/export/json_export.rb +2 -2
  19. data/lib/doing/plugins/export/template_export.rb +1 -1
  20. data/lib/doing/plugins/import/calendar_import.rb +7 -1
  21. data/lib/doing/plugins/import/doing_import.rb +6 -6
  22. data/lib/doing/plugins/import/timing_import.rb +7 -1
  23. data/lib/doing/string.rb +9 -7
  24. data/lib/doing/version.rb +1 -1
  25. data/lib/doing/wwid.rb +160 -92
  26. data/lib/examples/commands/autotag.rb +63 -0
  27. data/lib/examples/commands/wiki.rb +1 -0
  28. data/lib/examples/plugins/say_export.rb +1 -1
  29. data/lib/examples/plugins/{templates → wiki_export/templates}/wiki.css +0 -0
  30. data/lib/examples/plugins/{templates → wiki_export/templates}/wiki.haml +0 -0
  31. data/lib/examples/plugins/{templates → wiki_export/templates}/wiki_index.haml +0 -0
  32. data/lib/examples/plugins/{wiki_export.rb → wiki_export/wiki_export.rb} +0 -0
  33. data/scripts/generate_bash_completions.rb +3 -2
  34. data/scripts/generate_fish_completions.rb +4 -1
  35. data/scripts/generate_zsh_completions.rb +44 -39
  36. metadata +7 -7
  37. data/doing.fish +0 -278
data/doing.rdoc CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Doing uses a TaskPaper-like formatting to keep a plain text record of what you've been doing, complete with tag-based time tracking. The command line tool allows you to add entries, annotate with tags and notes, and view your entries with myriad options, with a focus on a "natural" language syntax.
4
4
 
5
- v2.0.2.pre
5
+ v2.0.8.pre
6
6
 
7
7
  === Global Options
8
8
  === --config_file arg
@@ -128,11 +128,21 @@ Edit duplicated entry with vim before adding
128
128
 
129
129
 
130
130
 
131
- ===== -i|--[no-]interactive
131
+ ===== -i|--interactive
132
132
  Select item to resume from a menu of matching entries
133
133
 
134
134
 
135
135
 
136
+ ===== --not
137
+ Resume items that *don't* match search/tag filters
138
+
139
+
140
+
141
+ ===== -x|--exact
142
+ Force exact search string matching (case sensitive)
143
+
144
+
145
+
136
146
  ==== Command: <tt>archive|move SECTION_OR_TAG</tt>
137
147
  Move entries between sections
138
148
 
@@ -191,6 +201,76 @@ Label moved items with @from(SECTION_NAME)
191
201
 
192
202
 
193
203
 
204
+ ===== --not
205
+ Show items that *don't* match search string
206
+
207
+
208
+
209
+ ===== -x|--exact
210
+ Force exact search string matching (case sensitive)
211
+
212
+
213
+
214
+ ==== Command: <tt>autotag </tt>
215
+ Autotag last entry or filtered entries
216
+
217
+
218
+ ===== Options
219
+ ===== --bool BOOLEAN
220
+
221
+ Boolean (AND|OR|NOT) with which to combine multiple tag filters
222
+
223
+ [Default Value] AND
224
+ [Must Match] (?i-mx:^(?:and|all|any|or|not|none)$)
225
+
226
+
227
+ ===== -c|--count COUNT
228
+
229
+ How many recent entries to autotag (0 for all)
230
+
231
+ [Default Value] 1
232
+ [Must Match] (?-mix:^\d+$)
233
+
234
+
235
+ ===== -s|--section SECTION_NAME
236
+
237
+ Section
238
+
239
+ [Default Value] All
240
+
241
+
242
+ ===== --search QUERY
243
+
244
+ Autotag entries matching search filter,
245
+ surround with slashes for regex (e.g. "/query.*/"),
246
+ start with single quote for exact match ("'query")
247
+
248
+ [Default Value] None
249
+
250
+
251
+ ===== --tag TAG
252
+
253
+ Autotag the last X entries containing TAG.
254
+ Separate multiple tags with comma (--tag=tag1,tag2), combine with --bool
255
+
256
+ [Default Value] None
257
+
258
+
259
+ ===== --force
260
+ Don't ask permission to autotag all entries when count is 0
261
+
262
+
263
+
264
+ ===== -i|--interactive
265
+ Select item(s) to tag from a menu of matching entries
266
+
267
+
268
+
269
+ ===== -u|--unfinished
270
+ Autotag last entry (or entries) not marked @done
271
+
272
+
273
+
194
274
  ==== Command: <tt>cancel COUNT</tt>
195
275
  End last X entries with no time tracked
196
276
 
@@ -223,7 +303,7 @@ Archive entries
223
303
 
224
304
 
225
305
 
226
- ===== -i|--[no-]interactive
306
+ ===== -i|--interactive
227
307
  Select item(s) to cancel from a menu of matching entries
228
308
 
229
309
 
@@ -241,6 +321,26 @@ Select a section to display from a menu
241
321
  List available color variables for configuration templates and views
242
322
 
243
323
 
324
+ ==== Command: <tt>completion </tt>
325
+ Generate shell completion scripts
326
+
327
+
328
+ ===== Options
329
+ ===== -f|--file PATH
330
+
331
+ File to write output to
332
+
333
+ [Default Value] stdout
334
+
335
+
336
+ ===== -t|--type SHELL
337
+
338
+ Shell to generate for (bash, zsh, fish)
339
+
340
+ [Default Value] zsh
341
+ [Must Match] (?i-mx:^[bzf](?:[ai]?sh)?$)
342
+
343
+
244
344
  ==== Command: <tt>config KEY_PATH</tt>
245
345
  Edit the configuration file or output a value from it
246
346
 
@@ -283,7 +383,7 @@ Format for --dump (json|yaml|raw)
283
383
  [Must Match] (?-mix:^(?:y(?:aml)?|j(?:son)?|r(?:aw)?)$)
284
384
 
285
385
 
286
- ===== -d|--[no-]dump
386
+ ===== -d|--dump
287
387
  Show a config key value based on arguments. Separate key paths with colons or dots, e.g. "export_templates.html". Empty arguments outputs the entire config.
288
388
 
289
389
 
@@ -439,11 +539,16 @@ Include date
439
539
 
440
540
 
441
541
 
442
- ===== -i|--[no-]interactive
542
+ ===== -i|--interactive
443
543
  Select item(s) to finish from a menu of matching entries
444
544
 
445
545
 
446
546
 
547
+ ===== --not
548
+ Finish items that *don't* match search/tag filters
549
+
550
+
551
+
447
552
  ===== -r|--remove
448
553
  Remove done tag
449
554
 
@@ -454,6 +559,11 @@ Finish last entry (or entries) not already marked @done
454
559
 
455
560
 
456
561
 
562
+ ===== -x|--exact
563
+ Force exact search string matching (case sensitive)
564
+
565
+
566
+
457
567
  ==== Command: <tt>grep|search SEARCH_PATTERN</tt>
458
568
  Search for entries
459
569
 
@@ -497,11 +607,21 @@ Sort tags by (name|time)
497
607
  [Must Match] (?i-mx:^(?:name|time)$)
498
608
 
499
609
 
610
+ ===== --[no-]case
611
+ Force case sensitive matching
612
+
613
+
614
+
500
615
  ===== -i|--interactive
501
616
  Display an interactive menu of results to perform further operations
502
617
 
503
618
 
504
619
 
620
+ ===== --not
621
+ Show items that *don't* match search string
622
+
623
+
624
+
505
625
  ===== --only_timed
506
626
  Only show items with recorded time intervals
507
627
 
@@ -517,6 +637,11 @@ Show intervals with totals at the end of output
517
637
 
518
638
 
519
639
 
640
+ ===== -x|--exact
641
+ Force exact string matching (case sensitive)
642
+
643
+
644
+
520
645
  ==== Command: <tt>help command</tt>
521
646
  Shows a list of commands or help for one command
522
647
 
@@ -595,6 +720,11 @@ Autotag entries
595
720
 
596
721
 
597
722
 
723
+ ===== --not
724
+ Import items that *don't* match search/tag/date filters
725
+
726
+
727
+
598
728
  ===== --only_timed
599
729
  Only import items with recorded time intervals
600
730
 
@@ -605,6 +735,11 @@ Allow entries that overlap existing times
605
735
 
606
736
 
607
737
 
738
+ ===== -x|--exact
739
+ Force exact search string matching (case sensitive)
740
+
741
+
742
+
608
743
  ==== Command: <tt>last </tt>
609
744
  Show the last entry, optionally edit
610
745
 
@@ -644,6 +779,16 @@ Edit entry with vim
644
779
 
645
780
 
646
781
 
782
+ ===== --not
783
+ Show items that *don't* match search string or tag filter
784
+
785
+
786
+
787
+ ===== -x|--exact
788
+ Force exact search string matching (case sensitive)
789
+
790
+
791
+
647
792
  ==== Command: <tt>later ENTRY</tt>
648
793
  Add an item to the Later section
649
794
 
@@ -721,11 +866,16 @@ Don't ask permission to flag all entries when count is 0
721
866
 
722
867
 
723
868
 
724
- ===== -i|--[no-]interactive
869
+ ===== -i|--interactive
725
870
  Select item(s) to flag from a menu of matching entries
726
871
 
727
872
 
728
873
 
874
+ ===== --not
875
+ Flag items that *don't* match search/tag/date filters
876
+
877
+
878
+
729
879
  ===== -r|--remove
730
880
  Remove flag
731
881
 
@@ -736,6 +886,11 @@ Flag last entry (or entries) not marked @done
736
886
 
737
887
 
738
888
 
889
+ ===== -x|--exact
890
+ Force exact search string matching (case sensitive)
891
+
892
+
893
+
739
894
  ==== Command: <tt>meanwhile ENTRY</tt>
740
895
  Finish any running @meanwhile tasks and optionally create a new one
741
896
 
@@ -762,7 +917,7 @@ Section
762
917
  [Default Value] None
763
918
 
764
919
 
765
- ===== -a|--[no-]archive
920
+ ===== -a|--archive
766
921
  Archive previous @meanwhile entry
767
922
 
768
923
 
@@ -815,16 +970,26 @@ Edit entry with vim
815
970
 
816
971
 
817
972
 
818
- ===== -i|--[no-]interactive
973
+ ===== -i|--interactive
819
974
  Select item for new note from a menu of matching entries
820
975
 
821
976
 
822
977
 
978
+ ===== --not
979
+ Add note to item that *doesn't* match search/tag filters
980
+
981
+
982
+
823
983
  ===== -r|--remove
824
984
  Replace/Remove last entry's note (default append)
825
985
 
826
986
 
827
987
 
988
+ ===== -x|--exact
989
+ Force exact search string matching (case sensitive)
990
+
991
+
992
+
828
993
  ==== Command: <tt>now|next ENTRY</tt>
829
994
  Add an entry
830
995
 
@@ -937,10 +1102,10 @@ Import plugins are available using `doing import --type PLUGIN`.
937
1102
  List plugins of type (import, export)
938
1103
 
939
1104
  [Default Value] all
940
- [Must Match] (?i-mx:^[iea].*$)
1105
+ [Must Match] (?i-mx:^(?:[iea].*)$)
941
1106
 
942
1107
 
943
- ===== -c|--[no-]column
1108
+ ===== -c|--column
944
1109
  List in single column for completion
945
1110
 
946
1111
 
@@ -965,7 +1130,7 @@ Sort tags by (name|time)
965
1130
  [Must Match] (?i-mx:^(?:name|time)$)
966
1131
 
967
1132
 
968
- ===== -i|--[no-]interactive
1133
+ ===== -i|--interactive
969
1134
  Select from a menu of matching entries to perform additional operations
970
1135
 
971
1136
 
@@ -995,7 +1160,7 @@ Boolean (AND|OR|NOT) with which to combine multiple tag filters
995
1160
 
996
1161
  ===== -s|--section NAME
997
1162
 
998
- Set the start date of an item to now
1163
+ Limit search to section
999
1164
 
1000
1165
  [Default Value] All
1001
1166
 
@@ -1014,16 +1179,26 @@ Reset last entry matching tag
1014
1179
  [Default Value] None
1015
1180
 
1016
1181
 
1017
- ===== -i|--[no-]interactive
1182
+ ===== -i|--interactive
1018
1183
  Select from a menu of matching entries
1019
1184
 
1020
1185
 
1021
1186
 
1187
+ ===== --not
1188
+ Reset items that *don't* match search/tag filters
1189
+
1190
+
1191
+
1022
1192
  ===== -r|--[no-]resume
1023
1193
  Resume entry (remove @done)
1024
1194
 
1025
1195
 
1026
1196
 
1197
+ ===== -x|--exact
1198
+ Force exact search string matching (case sensitive)
1199
+
1200
+
1201
+
1027
1202
  ==== Command: <tt>rotate </tt>
1028
1203
  Move entries to archive file
1029
1204
 
@@ -1074,12 +1249,22 @@ Tag filter, combine multiple tags with a comma. Added for compatibility with oth
1074
1249
  [Default Value] None
1075
1250
 
1076
1251
 
1252
+ ===== --not
1253
+ Rotate items that *don't* match search string or tag filter
1254
+
1255
+
1256
+
1257
+ ===== -x|--exact
1258
+ Force exact search string matching (case sensitive)
1259
+
1260
+
1261
+
1077
1262
  ==== Command: <tt>sections </tt>
1078
1263
  List sections
1079
1264
 
1080
1265
 
1081
1266
  ===== Options
1082
- ===== -c|--[no-]column
1267
+ ===== -c|--column
1083
1268
  List in single column
1084
1269
 
1085
1270
 
@@ -1140,7 +1325,7 @@ Archive selected items
1140
1325
 
1141
1326
 
1142
1327
 
1143
- ===== --[no-]again|--[no-]resume
1328
+ ===== --again|--resume
1144
1329
  Copy selection as a new entry with current time and no @done tag. Only works with single selections. Can be combined with --editor.
1145
1330
 
1146
1331
 
@@ -1180,11 +1365,21 @@ Use --no-menu to skip the interactive menu. Use with --query to filter items and
1180
1365
 
1181
1366
 
1182
1367
 
1368
+ ===== --not
1369
+ Select items that *don't* match search/tag filters
1370
+
1371
+
1372
+
1183
1373
  ===== -r|--remove
1184
1374
  Reverse -c, -f, --flag, and -t (remove instead of adding)
1185
1375
 
1186
1376
 
1187
1377
 
1378
+ ===== -x|--exact
1379
+ Force exact search string matching (case sensitive)
1380
+
1381
+
1382
+
1188
1383
  ==== Command: <tt>show [SECTION|@TAGS]</tt>
1189
1384
  List all entries
1190
1385
 
@@ -1281,11 +1476,16 @@ Sort tags by (name|time)
1281
1476
  [Must Match] (?i-mx:^(?:name|time))
1282
1477
 
1283
1478
 
1284
- ===== -i|--[no-]interactive
1479
+ ===== -i|--interactive
1285
1480
  Select from a menu of matching entries to perform additional operations
1286
1481
 
1287
1482
 
1288
1483
 
1484
+ ===== --not
1485
+ Show items that *don't* match search/tag/date filters
1486
+
1487
+
1488
+
1289
1489
  ===== --only_timed
1290
1490
  Only show items with recorded time intervals
1291
1491
 
@@ -1301,6 +1501,11 @@ Show intervals with totals at the end of output
1301
1501
 
1302
1502
 
1303
1503
 
1504
+ ===== -x|--exact
1505
+ Force exact search string matching (case sensitive)
1506
+
1507
+
1508
+
1304
1509
  ==== Command: <tt>since DATE_STRING</tt>
1305
1510
  List entries since a date
1306
1511
 
@@ -1416,11 +1621,16 @@ Don't ask permission to tag all entries when count is 0
1416
1621
 
1417
1622
 
1418
1623
 
1419
- ===== -i|--[no-]interactive
1624
+ ===== -i|--interactive
1420
1625
  Select item(s) to tag from a menu of matching entries
1421
1626
 
1422
1627
 
1423
1628
 
1629
+ ===== --not
1630
+ Tag items that *don't* match search/tag filters
1631
+
1632
+
1633
+
1424
1634
  ===== -r|--remove
1425
1635
  Remove given tag(s)
1426
1636
 
@@ -1436,6 +1646,11 @@ Tag last entry (or entries) not marked @done
1436
1646
 
1437
1647
 
1438
1648
 
1649
+ ===== -x|--exact
1650
+ Force exact search string matching (case sensitive)
1651
+
1652
+
1653
+
1439
1654
  ==== Command: <tt>template TYPE</tt>
1440
1655
  Output HTML, CSS, and Markdown (ERB) templates for customization
1441
1656
 
@@ -1449,7 +1664,7 @@ List in single column for completion
1449
1664
 
1450
1665
 
1451
1666
 
1452
- ===== -l|--[no-]list
1667
+ ===== -l|--list
1453
1668
  List all available templates
1454
1669
 
1455
1670
 
@@ -1605,11 +1820,16 @@ Include colors in output
1605
1820
 
1606
1821
 
1607
1822
 
1608
- ===== -i|--[no-]interactive
1823
+ ===== -i|--interactive
1609
1824
  Select from a menu of matching entries to perform additional operations
1610
1825
 
1611
1826
 
1612
1827
 
1828
+ ===== --not
1829
+ Show items that *don't* match search string
1830
+
1831
+
1832
+
1613
1833
  ===== --only_timed
1614
1834
  Only show items with recorded time intervals (override view settings)
1615
1835
 
@@ -1625,6 +1845,11 @@ Show intervals with totals at the end of output
1625
1845
 
1626
1846
 
1627
1847
 
1848
+ ===== -x|--exact
1849
+ Force exact search string matching (case sensitive)
1850
+
1851
+
1852
+
1628
1853
  ==== Command: <tt>views </tt>
1629
1854
  List available custom views
1630
1855
 
data/example_plugin.rb CHANGED
@@ -150,7 +150,7 @@ module Doing
150
150
  finished_at = i.end_date
151
151
  took += finished_at.strftime('%A %B %e at %I:%M%p')
152
152
 
153
- d, h, m = wwid.fmt_time(interval)
153
+ d, h, m = wwid.format_time(interval)
154
154
  took += ' and it took'
155
155
  took += " #{d.to_i} days" if d.to_i.positive?
156
156
  took += " #{h.to_i} hours" if h.to_i.positive?
@@ -2,3 +2,4 @@
2
2
 
3
3
  scripts/generate_fish_completions.rb > lib/completion/doing.fish
4
4
  scripts/generate_bash_completions.rb > lib/completion/doing.bash
5
+ scripts/generate_zsh_completions.rb > lib/completion/_doing.zsh