doing 2.0.22 → 2.1.0pre

Sign up to get free protection for your applications and to get access to all the features.
Files changed (88) hide show
  1. checksums.yaml +4 -4
  2. data/.yardoc/checksums +18 -15
  3. data/.yardoc/object_types +0 -0
  4. data/.yardoc/objects/root.dat +0 -0
  5. data/CHANGELOG.md +36 -1
  6. data/Gemfile.lock +8 -1
  7. data/README.md +7 -1
  8. data/Rakefile +23 -4
  9. data/bin/doing +323 -173
  10. data/doc/Array.html +354 -1
  11. data/doc/Doing/Color.html +104 -92
  12. data/doc/Doing/Completion.html +216 -0
  13. data/doc/Doing/Configuration.html +340 -5
  14. data/doc/Doing/Content.html +229 -0
  15. data/doc/Doing/Errors/DoingNoTraceError.html +1 -1
  16. data/doc/Doing/Errors/DoingRuntimeError.html +1 -1
  17. data/doc/Doing/Errors/DoingStandardError.html +1 -1
  18. data/doc/Doing/Errors/EmptyInput.html +1 -1
  19. data/doc/Doing/Errors/NoResults.html +1 -1
  20. data/doc/Doing/Errors/PluginException.html +1 -1
  21. data/doc/Doing/Errors/UserCancelled.html +1 -1
  22. data/doc/Doing/Errors/WrongCommand.html +1 -1
  23. data/doc/Doing/Errors.html +1 -1
  24. data/doc/Doing/Hooks.html +1 -1
  25. data/doc/Doing/Item.html +337 -49
  26. data/doc/Doing/Items.html +444 -35
  27. data/doc/Doing/LogAdapter.html +139 -51
  28. data/doc/Doing/Note.html +253 -22
  29. data/doc/Doing/Pager.html +74 -36
  30. data/doc/Doing/Plugins.html +1 -1
  31. data/doc/Doing/Prompt.html +674 -0
  32. data/doc/Doing/Section.html +354 -0
  33. data/doc/Doing/Util.html +57 -1
  34. data/doc/Doing/WWID.html +477 -670
  35. data/doc/Doing/WWIDFile.html +398 -0
  36. data/doc/Doing.html +5 -5
  37. data/doc/GLI/Commands/MarkdownDocumentListener.html +1 -1
  38. data/doc/GLI/Commands.html +1 -1
  39. data/doc/GLI.html +1 -1
  40. data/doc/Hash.html +97 -1
  41. data/doc/Status.html +37 -3
  42. data/doc/String.html +599 -23
  43. data/doc/Symbol.html +3 -3
  44. data/doc/Time.html +1 -1
  45. data/doc/_index.html +22 -1
  46. data/doc/class_list.html +1 -1
  47. data/doc/file.README.html +8 -2
  48. data/doc/index.html +8 -2
  49. data/doc/method_list.html +453 -173
  50. data/doc/top-level-namespace.html +1 -1
  51. data/doing.gemspec +3 -0
  52. data/doing.rdoc +79 -27
  53. data/example_plugin.rb +5 -5
  54. data/lib/completion/_doing.zsh +42 -42
  55. data/lib/completion/doing.bash +10 -10
  56. data/lib/completion/doing.fish +1 -280
  57. data/lib/doing/array.rb +36 -0
  58. data/lib/doing/colors.rb +70 -66
  59. data/lib/doing/completion/bash_completion.rb +1 -2
  60. data/lib/doing/completion/fish_completion.rb +1 -1
  61. data/lib/doing/completion/zsh_completion.rb +1 -1
  62. data/lib/doing/completion.rb +6 -0
  63. data/lib/doing/configuration.rb +134 -23
  64. data/lib/doing/hash.rb +37 -0
  65. data/lib/doing/item.rb +77 -12
  66. data/lib/doing/items.rb +125 -0
  67. data/lib/doing/log_adapter.rb +58 -4
  68. data/lib/doing/note.rb +53 -1
  69. data/lib/doing/pager.rb +49 -38
  70. data/lib/doing/plugins/export/markdown_export.rb +4 -4
  71. data/lib/doing/plugins/export/template_export.rb +2 -2
  72. data/lib/doing/plugins/import/calendar_import.rb +4 -4
  73. data/lib/doing/plugins/import/doing_import.rb +5 -7
  74. data/lib/doing/plugins/import/timing_import.rb +3 -3
  75. data/lib/doing/prompt.rb +206 -0
  76. data/lib/doing/section.rb +30 -0
  77. data/lib/doing/string.rb +123 -35
  78. data/lib/doing/util.rb +14 -6
  79. data/lib/doing/version.rb +1 -1
  80. data/lib/doing/wwid.rb +307 -614
  81. data/lib/doing.rb +6 -2
  82. data/lib/examples/plugins/capture_thing_import.rb +162 -0
  83. data/rdoc_to_mmd.rb +14 -8
  84. data/scripts/generate_bash_completions.rb +1 -1
  85. data/scripts/generate_fish_completions.rb +1 -1
  86. data/scripts/generate_zsh_completions.rb +1 -1
  87. metadata +73 -5
  88. data/lib/doing/wwidfile.rb +0 -117
@@ -176,7 +176,7 @@
176
176
  </div>
177
177
 
178
178
  <div id="footer">
179
- Generated on Thu Nov 18 16:39:12 2021 by
179
+ Generated on Sat Nov 27 10:06:03 2021 by
180
180
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
181
181
  0.9.26 (ruby-3.0.1).
182
182
  </div>
@@ -181,7 +181,7 @@
181
181
  </div>
182
182
 
183
183
  <div id="footer">
184
- Generated on Thu Nov 18 16:39:11 2021 by
184
+ Generated on Sat Nov 27 10:06:03 2021 by
185
185
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
186
186
  0.9.26 (ruby-3.0.1).
187
187
  </div>
data/doc/Doing/Hooks.html CHANGED
@@ -354,7 +354,7 @@
354
354
  </div>
355
355
 
356
356
  <div id="footer">
357
- Generated on Thu Nov 18 16:39:11 2021 by
357
+ Generated on Sat Nov 27 10:06:03 2021 by
358
358
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
359
359
  0.9.26 (ruby-3.0.1).
360
360
  </div>
data/doc/Doing/Item.html CHANGED
@@ -139,6 +139,34 @@
139
139
  <span class="summary_desc"><div class='inline'><p>Returns the value of attribute date.</p>
140
140
  </div></span>
141
141
 
142
+ </li>
143
+
144
+
145
+ <li class="public ">
146
+ <span class="summary_signature">
147
+
148
+ <a href="#id-instance_method" title="#id (instance method)">#<strong>id</strong> &#x21d2; String </a>
149
+
150
+
151
+
152
+ </span>
153
+
154
+
155
+
156
+
157
+ <span class="note title readonly">readonly</span>
158
+
159
+
160
+
161
+
162
+
163
+
164
+
165
+
166
+
167
+ <span class="summary_desc"><div class='inline'><p>Generate a hash that represents the entry.</p>
168
+ </div></span>
169
+
142
170
  </li>
143
171
 
144
172
 
@@ -324,6 +352,29 @@
324
352
  <span class="summary_desc"><div class='inline'><p>Get the difference between the item&#39;s start date and the value of its @done tag (if present).</p>
325
353
  </div></span>
326
354
 
355
+ </li>
356
+
357
+
358
+ <li class="public ">
359
+ <span class="summary_signature">
360
+
361
+ <a href="#move_to-instance_method" title="#move_to (instance method)">#<strong>move_to</strong>(new_section, label: true, log: true) &#x21d2; Object </a>
362
+
363
+
364
+
365
+ </span>
366
+
367
+
368
+
369
+
370
+
371
+
372
+
373
+
374
+
375
+ <span class="summary_desc"><div class='inline'><p>Move item from current section to destination section.</p>
376
+ </div></span>
377
+
327
378
  </li>
328
379
 
329
380
 
@@ -376,7 +427,7 @@
376
427
  <li class="public ">
377
428
  <span class="summary_signature">
378
429
 
379
- <a href="#search-instance_method" title="#search (instance method)">#<strong>search</strong>(search, negate: false, case_type: :smart) &#x21d2; Boolean </a>
430
+ <a href="#search-instance_method" title="#search (instance method)">#<strong>search</strong>(search, distance: 3, negate: false, case_type: :smart, fuzzy: false) &#x21d2; Boolean </a>
380
431
 
381
432
 
382
433
 
@@ -443,7 +494,7 @@
443
494
  <li class="public ">
444
495
  <span class="summary_signature">
445
496
 
446
- <a href="#tag-instance_method" title="#tag (instance method)">#<strong>tag</strong>(tag, value: nil, remove: false, rename_to: nil, regex: false) &#x21d2; Object </a>
497
+ <a href="#tag-instance_method" title="#tag (instance method)">#<strong>tag</strong>(tags, **options) &#x21d2; Object </a>
447
498
 
448
499
 
449
500
 
@@ -506,6 +557,29 @@
506
557
  <span class="summary_desc"><div class='inline'><p>Test if item contains tag(s).</p>
507
558
  </div></span>
508
559
 
560
+ </li>
561
+
562
+
563
+ <li class="public ">
564
+ <span class="summary_signature">
565
+
566
+ <a href="#to_s-instance_method" title="#to_s (instance method)">#<strong>to_s</strong> &#x21d2; Object </a>
567
+
568
+
569
+
570
+ </span>
571
+
572
+
573
+
574
+
575
+
576
+
577
+
578
+
579
+
580
+ <span class="summary_desc"><div class='inline'><p>outputs item in Doing file format, including leading tab.</p>
581
+ </div></span>
582
+
509
583
  </li>
510
584
 
511
585
 
@@ -632,6 +706,47 @@ the item belongs</p>
632
706
  <div class="tags">
633
707
 
634
708
 
709
+ </div>
710
+ </div>
711
+
712
+
713
+ <span id=""></span>
714
+ <div class="method_details ">
715
+ <h3 class="signature " id="id-instance_method">
716
+
717
+ #<strong>id</strong> &#x21d2; <tt><span class='object_link'><a href="../String.html" title="String (class)">String</a></span></tt> <span class="extras">(readonly)</span>
718
+
719
+
720
+
721
+
722
+
723
+ </h3><div class="docstring">
724
+ <div class="discussion">
725
+ <p>Generate a hash that represents the entry</p>
726
+
727
+
728
+ </div>
729
+ </div>
730
+ <div class="tags">
731
+
732
+ <p class="tag_title">Returns:</p>
733
+ <ul class="return">
734
+
735
+ <li>
736
+
737
+
738
+ <span class='type'>(<tt><span class='object_link'><a href="../String.html" title="String (class)">String</a></span></tt>)</span>
739
+
740
+
741
+
742
+ &mdash;
743
+ <div class='inline'><p>entry hash</p>
744
+ </div>
745
+
746
+ </li>
747
+
748
+ </ul>
749
+
635
750
  </div>
636
751
  </div>
637
752
 
@@ -848,6 +963,100 @@ the value of its @done tag (if present)</p>
848
963
 
849
964
  </ul>
850
965
 
966
+ </div>
967
+ </div>
968
+
969
+ <div class="method_details ">
970
+ <h3 class="signature " id="move_to-instance_method">
971
+
972
+ #<strong>move_to</strong>(new_section, label: true, log: true) &#x21d2; <tt>Object</tt>
973
+
974
+
975
+
976
+
977
+
978
+ </h3><div class="docstring">
979
+ <div class="discussion">
980
+ <p>Move item from current section to destination section</p>
981
+
982
+
983
+ </div>
984
+ </div>
985
+ <div class="tags">
986
+ <p class="tag_title">Parameters:</p>
987
+ <ul class="param">
988
+
989
+ <li>
990
+
991
+ <span class='name'>new_section</span>
992
+
993
+
994
+ <span class='type'>(<tt><span class='object_link'><a href="../String.html" title="String (class)">String</a></span></tt>)</span>
995
+
996
+
997
+
998
+ &mdash;
999
+ <div class='inline'><p>The destination
1000
+ section</p>
1001
+ </div>
1002
+
1003
+ </li>
1004
+
1005
+ <li>
1006
+
1007
+ <span class='name'>label</span>
1008
+
1009
+
1010
+ <span class='type'>(<tt>Boolean</tt>)</span>
1011
+
1012
+
1013
+ <em class="default">(defaults to: <tt>true</tt>)</em>
1014
+
1015
+
1016
+ &mdash;
1017
+ <div class='inline'><p>add @from(original
1018
+ section) tag</p>
1019
+ </div>
1020
+
1021
+ </li>
1022
+
1023
+ <li>
1024
+
1025
+ <span class='name'>log</span>
1026
+
1027
+
1028
+ <span class='type'>(<tt>Boolean</tt>)</span>
1029
+
1030
+
1031
+ <em class="default">(defaults to: <tt>true</tt>)</em>
1032
+
1033
+
1034
+ &mdash;
1035
+ <div class='inline'><p>log this action</p>
1036
+ </div>
1037
+
1038
+ </li>
1039
+
1040
+ </ul>
1041
+
1042
+ <p class="tag_title">Returns:</p>
1043
+ <ul class="return">
1044
+
1045
+ <li>
1046
+
1047
+
1048
+ <span class='type'></span>
1049
+
1050
+
1051
+
1052
+
1053
+ <div class='inline'><p>nothing</p>
1054
+ </div>
1055
+
1056
+ </li>
1057
+
1058
+ </ul>
1059
+
851
1060
  </div>
852
1061
  </div>
853
1062
 
@@ -971,7 +1180,7 @@ value overlaps with another item&#39;s</p>
971
1180
  <div class="method_details ">
972
1181
  <h3 class="signature " id="search-instance_method">
973
1182
 
974
- #<strong>search</strong>(search, negate: false, case_type: :smart) &#x21d2; <tt>Boolean</tt>
1183
+ #<strong>search</strong>(search, distance: 3, negate: false, case_type: :smart, fuzzy: false) &#x21d2; <tt>Boolean</tt>
975
1184
 
976
1185
 
977
1186
 
@@ -1034,7 +1243,7 @@ value overlaps with another item&#39;s</p>
1034
1243
  &mdash;
1035
1244
  <div class='inline'><p>The case-sensitivity
1036
1245
  type (:sensitive,
1037
- :insensitive, :smart)</p>
1246
+ :ignore, :smart)</p>
1038
1247
  </div>
1039
1248
 
1040
1249
  </li>
@@ -1133,7 +1342,7 @@ type (:sensitive,
1133
1342
  <div class="method_details ">
1134
1343
  <h3 class="signature " id="tag-instance_method">
1135
1344
 
1136
- #<strong>tag</strong>(tag, value: nil, remove: false, rename_to: nil, regex: false) &#x21d2; <tt>Object</tt>
1345
+ #<strong>tag</strong>(tags, **options) &#x21d2; <tt>Object</tt>
1137
1346
 
1138
1347
 
1139
1348
 
@@ -1152,88 +1361,145 @@ type (:sensitive,
1152
1361
 
1153
1362
  <li>
1154
1363
 
1155
- <span class='name'>tag</span>
1364
+ <span class='name'>tags</span>
1156
1365
 
1157
1366
 
1158
- <span class='type'>(<tt><span class='object_link'><a href="../String.html" title="String (class)">String</a></span></tt>)</span>
1367
+ <span class='type'>(<tt><span class='object_link'><a href="../Array.html" title="Array (class)">Array</a></span></tt>)</span>
1159
1368
 
1160
1369
 
1161
1370
 
1162
1371
  &mdash;
1163
- <div class='inline'><p>The tag to add</p>
1372
+ <div class='inline'><p>The tags to apply</p>
1164
1373
  </div>
1165
1374
 
1166
1375
  </li>
1167
1376
 
1168
1377
  <li>
1169
1378
 
1170
- <span class='name'>value</span>
1171
-
1379
+ <span class='name'>**options</span>
1172
1380
 
1173
- <span class='type'>(<tt><span class='object_link'><a href="../String.html" title="String (class)">String</a></span></tt>)</span>
1174
1381
 
1382
+ <span class='type'></span>
1175
1383
 
1176
- <em class="default">(defaults to: <tt>nil</tt>)</em>
1177
1384
 
1178
1385
 
1179
1386
  &mdash;
1180
- <div class='inline'><p>A value to include as @tag(value)</p>
1387
+ <div class='inline'><p>Additional options</p>
1181
1388
  </div>
1182
1389
 
1183
1390
  </li>
1184
1391
 
1185
1392
  <li>
1186
1393
 
1187
- <span class='name'>remove</span>
1188
-
1394
+ <span class='name'>options</span>
1189
1395
 
1190
- <span class='type'>(<tt>Boolean</tt>)</span>
1191
1396
 
1397
+ <span class='type'>(<tt><span class='object_link'><a href="../Hash.html" title="Hash (class)">Hash</a></span></tt>)</span>
1192
1398
 
1193
- <em class="default">(defaults to: <tt>false</tt>)</em>
1194
1399
 
1195
1400
 
1196
1401
  &mdash;
1197
- <div class='inline'><p>if true remove instead of adding</p>
1402
+ <div class='inline'><p>a customizable set of options</p>
1198
1403
  </div>
1199
1404
 
1200
1405
  </li>
1201
1406
 
1202
- <li>
1203
-
1204
- <span class='name'>rename_to</span>
1205
-
1206
-
1207
- <span class='type'>(<tt><span class='object_link'><a href="../String.html" title="String (class)">String</a></span></tt>)</span>
1208
-
1209
-
1210
- <em class="default">(defaults to: <tt>nil</tt>)</em>
1211
-
1212
-
1213
- &mdash;
1214
- <div class='inline'><p>if not nil, rename target tag to this tag name</p>
1215
- </div>
1216
-
1217
- </li>
1407
+ </ul>
1408
+
1218
1409
 
1219
- <li>
1220
-
1221
- <span class='name'>regex</span>
1222
-
1223
-
1224
- <span class='type'>(<tt>Boolean</tt>)</span>
1225
-
1226
-
1227
- <em class="default">(defaults to: <tt>false</tt>)</em>
1228
-
1410
+
1411
+
1412
+
1413
+
1414
+ <p class="tag_title">Options Hash (<tt>**options</tt>):</p>
1415
+ <ul class="option">
1229
1416
 
1230
- &mdash;
1231
- <div class='inline'><p>treat target tag string as regex pattern</p>
1417
+ <li>
1418
+ <span class="name">:date</span>
1419
+ <span class="type">(<tt>Boolean</tt>)</span>
1420
+ <span class="default">
1421
+
1422
+ </span>
1423
+
1424
+ &mdash; <div class='inline'><p>Include timestamp?</p>
1425
+ </div>
1426
+
1427
+ </li>
1428
+
1429
+ <li>
1430
+ <span class="name">:single</span>
1431
+ <span class="type">(<tt>Boolean</tt>)</span>
1432
+ <span class="default">
1433
+
1434
+ </span>
1435
+
1436
+ &mdash; <div class='inline'><p>Log as a single change?</p>
1437
+ </div>
1438
+
1439
+ </li>
1440
+
1441
+ <li>
1442
+ <span class="name">:value</span>
1443
+ <span class="type">(<tt><span class='object_link'><a href="../String.html" title="String (class)">String</a></span></tt>)</span>
1444
+ <span class="default">
1445
+
1446
+ </span>
1447
+
1448
+ &mdash; <div class='inline'><p>A value to include as @tag(value)</p>
1449
+ </div>
1450
+
1451
+ </li>
1452
+
1453
+ <li>
1454
+ <span class="name">:remove</span>
1455
+ <span class="type">(<tt>Boolean</tt>)</span>
1456
+ <span class="default">
1457
+
1458
+ </span>
1459
+
1460
+ &mdash; <div class='inline'><p>if true remove instead of adding</p>
1232
1461
  </div>
1462
+
1463
+ </li>
1464
+
1465
+ <li>
1466
+ <span class="name">:rename_to</span>
1467
+ <span class="type">(<tt><span class='object_link'><a href="../String.html" title="String (class)">String</a></span></tt>)</span>
1468
+ <span class="default">
1469
+
1470
+ </span>
1471
+
1472
+ &mdash; <div class='inline'><p>if not nil, rename target tag to this tag name</p>
1473
+ </div>
1474
+
1475
+ </li>
1476
+
1477
+ <li>
1478
+ <span class="name">:regex</span>
1479
+ <span class="type">(<tt>Boolean</tt>)</span>
1480
+ <span class="default">
1481
+
1482
+ </span>
1483
+
1484
+ &mdash; <div class='inline'><p>treat target tag string as regex pattern</p>
1485
+ </div>
1486
+
1487
+ </li>
1488
+
1489
+ <li>
1490
+ <span class="name">:force</span>
1491
+ <span class="type">(<tt>Boolean</tt>)</span>
1492
+ <span class="default">
1493
+
1494
+ </span>
1495
+
1496
+ &mdash; <div class='inline'><p>with rename_to, add tag if it doesn&#39;t exist</p>
1497
+ </div>
1498
+
1499
+ </li>
1233
1500
 
1234
- </li>
1501
+ </ul>
1235
1502
 
1236
- </ul>
1237
1503
 
1238
1504
 
1239
1505
  </div>
@@ -1367,6 +1633,28 @@ type (:sensitive,
1367
1633
 
1368
1634
  </ul>
1369
1635
 
1636
+ </div>
1637
+ </div>
1638
+
1639
+ <div class="method_details ">
1640
+ <h3 class="signature " id="to_s-instance_method">
1641
+
1642
+ #<strong>to_s</strong> &#x21d2; <tt>Object</tt>
1643
+
1644
+
1645
+
1646
+
1647
+
1648
+ </h3><div class="docstring">
1649
+ <div class="discussion">
1650
+ <p>outputs item in Doing file format, including leading tab</p>
1651
+
1652
+
1653
+ </div>
1654
+ </div>
1655
+ <div class="tags">
1656
+
1657
+
1370
1658
  </div>
1371
1659
  </div>
1372
1660
 
@@ -1375,7 +1663,7 @@ type (:sensitive,
1375
1663
  </div>
1376
1664
 
1377
1665
  <div id="footer">
1378
- Generated on Thu Nov 18 16:39:11 2021 by
1666
+ Generated on Sat Nov 27 10:06:03 2021 by
1379
1667
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1380
1668
  0.9.26 (ruby-3.0.1).
1381
1669
  </div>