doing 2.1.69 → 2.1.72

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 (121) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +16 -0
  3. data/Gemfile.lock +3 -3
  4. data/bin/commands/commands.rb +57 -2
  5. data/docs/doc/Array.html +1 -1
  6. data/docs/doc/BooleanTermParser/Clause.html +1 -1
  7. data/docs/doc/BooleanTermParser/Operator.html +1 -1
  8. data/docs/doc/BooleanTermParser/Query.html +1 -1
  9. data/docs/doc/BooleanTermParser/QueryParser.html +1 -1
  10. data/docs/doc/BooleanTermParser/QueryTransformer.html +1 -1
  11. data/docs/doc/BooleanTermParser.html +1 -1
  12. data/docs/doc/Doing/ArrayCleanup.html +1 -1
  13. data/docs/doc/Doing/ArrayNestedHash.html +1 -1
  14. data/docs/doc/Doing/ArrayTags.html +1 -1
  15. data/docs/doc/Doing/CSVExport.html +1 -1
  16. data/docs/doc/Doing/CalendarImport.html +1 -1
  17. data/docs/doc/Doing/Change.html +1 -1
  18. data/docs/doc/Doing/Changes.html +1 -1
  19. data/docs/doc/Doing/ChronifyArray.html +1 -1
  20. data/docs/doc/Doing/ChronifyNumeric.html +1 -1
  21. data/docs/doc/Doing/ChronifyString.html +1 -1
  22. data/docs/doc/Doing/Color.html +1 -1
  23. data/docs/doc/Doing/Completion/BashCompletions.html +1 -1
  24. data/docs/doc/Doing/Completion/FigCompletions.html +1 -1
  25. data/docs/doc/Doing/Completion/FishCompletions.html +1 -1
  26. data/docs/doc/Doing/Completion/StringUtils.html +1 -1
  27. data/docs/doc/Doing/Completion/ZshCompletions.html +1 -1
  28. data/docs/doc/Doing/Completion.html +1 -1
  29. data/docs/doc/Doing/Configuration.html +1 -1
  30. data/docs/doc/Doing/DayOneRenderer.html +1 -1
  31. data/docs/doc/Doing/DayoneExport.html +1 -1
  32. data/docs/doc/Doing/DoingExport.html +1 -1
  33. data/docs/doc/Doing/DoingImport.html +1 -1
  34. data/docs/doc/Doing/Entry.html +1 -1
  35. data/docs/doc/Doing/Errors/DoingNoTraceError.html +1 -1
  36. data/docs/doc/Doing/Errors/DoingRuntimeError.html +1 -1
  37. data/docs/doc/Doing/Errors/DoingStandardError.html +1 -1
  38. data/docs/doc/Doing/Errors/EmptyInput.html +1 -1
  39. data/docs/doc/Doing/Errors/HistoryLimitError.html +1 -1
  40. data/docs/doc/Doing/Errors/InvalidPlugin.html +1 -1
  41. data/docs/doc/Doing/Errors/MissingBackupFile.html +1 -1
  42. data/docs/doc/Doing/Errors/NoResults.html +1 -1
  43. data/docs/doc/Doing/Errors/PluginException.html +1 -1
  44. data/docs/doc/Doing/Errors/UserCancelled.html +1 -1
  45. data/docs/doc/Doing/Errors/WrongCommand.html +1 -1
  46. data/docs/doc/Doing/Errors.html +1 -1
  47. data/docs/doc/Doing/HTMLExport.html +1 -1
  48. data/docs/doc/Doing/Hooks.html +1 -1
  49. data/docs/doc/Doing/Item.html +1 -1
  50. data/docs/doc/Doing/ItemDates.html +1 -1
  51. data/docs/doc/Doing/ItemQuery.html +1 -1
  52. data/docs/doc/Doing/ItemState.html +1 -1
  53. data/docs/doc/Doing/ItemTags.html +1 -1
  54. data/docs/doc/Doing/Items.html +1 -1
  55. data/docs/doc/Doing/JSONExport.html +1 -1
  56. data/docs/doc/Doing/JSONImport.html +1 -1
  57. data/docs/doc/Doing/Logger.html +1 -1
  58. data/docs/doc/Doing/MarkdownExport.html +1 -1
  59. data/docs/doc/Doing/Note.html +1 -1
  60. data/docs/doc/Doing/Pager.html +1 -1
  61. data/docs/doc/Doing/Plugins.html +1 -1
  62. data/docs/doc/Doing/Prompt.html +1 -1
  63. data/docs/doc/Doing/PromptChoose.html +1 -1
  64. data/docs/doc/Doing/PromptFZF.html +1 -1
  65. data/docs/doc/Doing/PromptInput.html +1 -1
  66. data/docs/doc/Doing/PromptSTD.html +1 -1
  67. data/docs/doc/Doing/PromptYN.html +1 -1
  68. data/docs/doc/Doing/Section.html +1 -1
  69. data/docs/doc/Doing/StringHighlight.html +1 -1
  70. data/docs/doc/Doing/StringNormalize.html +84 -1
  71. data/docs/doc/Doing/StringQuery.html +1 -1
  72. data/docs/doc/Doing/StringTags.html +1 -1
  73. data/docs/doc/Doing/StringTransform.html +1 -1
  74. data/docs/doc/Doing/StringTruncate.html +1 -1
  75. data/docs/doc/Doing/StringURL.html +1 -1
  76. data/docs/doc/Doing/SymbolNormalize.html +1 -1
  77. data/docs/doc/Doing/TaskPaperExport.html +1 -1
  78. data/docs/doc/Doing/TemplateExport.html +1 -1
  79. data/docs/doc/Doing/TemplateString.html +2 -2
  80. data/docs/doc/Doing/TimingImport.html +1 -1
  81. data/docs/doc/Doing/Types.html +1 -1
  82. data/docs/doc/Doing/Util/Backup.html +1 -1
  83. data/docs/doc/Doing/Util.html +1 -1
  84. data/docs/doc/Doing/Version.html +1 -1
  85. data/docs/doc/Doing/WWID.html +1 -1
  86. data/docs/doc/Doing.html +2 -2
  87. data/docs/doc/FalseClass.html +1 -1
  88. data/docs/doc/GLI/Commands/Help.html +1 -1
  89. data/docs/doc/GLI/Commands/MarkdownDocumentListener.html +1 -1
  90. data/docs/doc/GLI/Commands.html +1 -1
  91. data/docs/doc/GLI.html +1 -1
  92. data/docs/doc/Hash.html +1 -1
  93. data/docs/doc/Numeric.html +1 -1
  94. data/docs/doc/Object.html +1 -1
  95. data/docs/doc/PhraseParser/Operator.html +1 -1
  96. data/docs/doc/PhraseParser/PhraseClause.html +1 -1
  97. data/docs/doc/PhraseParser/Query.html +1 -1
  98. data/docs/doc/PhraseParser/QueryParser.html +1 -1
  99. data/docs/doc/PhraseParser/QueryTransformer.html +1 -1
  100. data/docs/doc/PhraseParser/TermClause.html +1 -1
  101. data/docs/doc/PhraseParser.html +1 -1
  102. data/docs/doc/Status.html +1 -1
  103. data/docs/doc/String.html +2 -2
  104. data/docs/doc/Symbol.html +1 -1
  105. data/docs/doc/Time.html +1 -1
  106. data/docs/doc/TrueClass.html +1 -1
  107. data/docs/doc/_index.html +1 -1
  108. data/docs/doc/file.README.html +1 -1
  109. data/docs/doc/index.html +1 -1
  110. data/docs/doc/method_list.html +417 -409
  111. data/docs/doc/top-level-namespace.html +1 -1
  112. data/doing.gemspec +0 -1
  113. data/doing.rdoc +50 -3
  114. data/lib/completion/_doing.zsh +4 -0
  115. data/lib/completion/doing.bash +11 -0
  116. data/lib/completion/doing.fish +5 -0
  117. data/lib/completion/doing.ts +40 -0
  118. data/lib/doing/normalize.rb +20 -0
  119. data/lib/doing/prompt/choose.rb +1 -1
  120. data/lib/doing/version.rb +1 -1
  121. metadata +2 -2
@@ -216,7 +216,7 @@
216
216
  </div>
217
217
 
218
218
  <div id="footer">
219
- Generated on Sun Aug 28 14:45:30 2022 by
219
+ Generated on Sun Jan 1 07:08:46 2023 by
220
220
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
221
221
  0.9.28 (ruby-3.0.1).
222
222
  </div>
data/doing.gemspec CHANGED
@@ -18,7 +18,6 @@ spec = Gem::Specification.new do |s|
18
18
  `git ls-files -z`.split("\x0").reject { |f| f.strip =~ %r{^((test|spec|features)/|\.git|buildnotes)} }
19
19
  end
20
20
  s.require_paths << 'lib'
21
-
22
21
  s.extra_rdoc_files = ['README.md']
23
22
  s.rdoc_options << '--title' << 'doing' << '--main' << 'README.md' << '--markup' << 'markdown'
24
23
  s.bindir = 'bin'
data/doing.rdoc CHANGED
@@ -5,7 +5,7 @@ record of what you've been doing, complete with tag-based time tracking. The
5
5
  command line tool allows you to add entries, annotate with tags and notes, and
6
6
  view your entries with myriad options, with a focus on a "natural" language syntax.
7
7
 
8
- v2.1.69
8
+ v2.1.72
9
9
 
10
10
  === Global Options
11
11
  === --config_file arg
@@ -504,11 +504,29 @@ Enable and disable Doing commands
504
504
 
505
505
 
506
506
  ===== Commands
507
- ====== Command: <tt>add|enable COMMAND [COMMAND...]</tt>
507
+ ====== Command: <tt>add|enable [COMMAND [COMMAND...]]</tt>
508
508
  Enable Doing commands
509
509
 
510
510
  Run without arguments to select commands from a list.
511
- ====== Command: <tt>remove|disable </tt>
511
+ ====== Command: <tt>ls|list [QUERY]...</tt>
512
+ List enabled commands
513
+
514
+
515
+ ======= Options
516
+ ======= -s|--style QUERY
517
+
518
+ List style (column, tab, comma, *space)
519
+
520
+ [Default Value] None
521
+ [Must Match] (?-mix:^[cts].*)
522
+
523
+
524
+ ======= -d|--[no-]disabled
525
+ List disabled commands
526
+
527
+
528
+
529
+ ====== Command: <tt>remove|disable [COMMAND [COMMAND...]]</tt>
512
530
  Disable Doing commands
513
531
 
514
532
 
@@ -1271,6 +1289,35 @@ Force exact search string matching (case sensitive)
1271
1289
 
1272
1290
 
1273
1291
 
1292
+ ==== Command: <tt>later ENTRY</tt>
1293
+ Add an item to the Later section
1294
+
1295
+
1296
+ ===== Options
1297
+ ===== -b|--back|--started DATE_STRING
1298
+
1299
+ Backdate start time to date string [4pm|20m|2h|yesterday noon]
1300
+
1301
+ [Default Value] None
1302
+
1303
+
1304
+ ===== -n|--note TEXT
1305
+
1306
+ Note
1307
+
1308
+ [Default Value] None
1309
+
1310
+
1311
+ ===== --ask
1312
+ Prompt for note via multi-line input
1313
+
1314
+
1315
+
1316
+ ===== -e|--editor
1317
+ Edit entry with vim
1318
+
1319
+
1320
+
1274
1321
  ==== Command: <tt>mark|flag </tt>
1275
1322
  Mark last entry as flagged
1276
1323
 
@@ -27,6 +27,7 @@ function _doing() {
27
27
  'help:Shows a list of commands or help for one command'
28
28
  'import:Import entries from an external source'
29
29
  'last:Show the last entry'
30
+ 'later:Add an item to the Later section'
30
31
  'mark:Mark last entry as flagged'
31
32
  'flag:Mark last entry as flagged'
32
33
  'meanwhile:Finish any running @meanwhile tasks and optionally create a new one'
@@ -126,6 +127,9 @@ function _doing() {
126
127
  last)
127
128
  args=( "--bool[Boolean used to combine multiple tags]:BOOLEAN:" "--case[Case sensitivity for search string matching [(c)ase-sensitive]:TYPE:" "--config_template[Output using a template from configuration]:TEMPLATE_KEY:" {'(--delete)-d','(-d)--delete'}"[Delete the last entry]" "--duration[Show elapsed time if entry is not tagged @done]" {'(--editor)-e','(-e)--editor'}"[Edit entry with vim]" {'(--hilite)-h','(-h)--hilite'}"[Highlight search matches in output]" "--not[Show items that *don't* match search/tag filters]" {'(--output)-o','(-o)--output'}"[Output to export format]:FORMAT:" {'(--section)-s','(-s)--section'}"[Specify a section]:NAME:" "--save[Save all current command line options as a new view]:VIEW_NAME:" "--search[Filter entries using a search query]:QUERY:" "--tag[Filter entries by tag]:TAG:" "--template[Override output format with a template string containing %placeholders]:TEMPLATE_STRING:" "--title[Title string to be used for output formats that require it]:TITLE:" "--val[Perform a tag value query]:QUERY:" {'(--exact)-x','(-x)--exact'}"[Force exact search string matching]" )
128
129
  ;;
130
+ later)
131
+ args=( "--ask[Prompt for note via multi-line input]" "--started[Backdate start time to date string [4pm|20m|2h|yesterday noon]]:DATE_STRING:" {'(--editor)-e','(-e)--editor'}"[Edit entry with vim]" {'(--note)-n','(-n)--note'}"[Note]:TEXT:" )
132
+ ;;
129
133
  mark)
130
134
  args=( "--bool[Boolean used to combine multiple tags]:BOOLEAN:" {'(--count)-c','(-c)--count'}"[How many recent entries to tag]:COUNT:" "--case[Case sensitivity for search string matching [(c)ase-sensitive]:TYPE:" {'(--date)-d','(-d)--date'}"[Include current date/time with tag]" "--force[Don't ask permission to flag all entries when count is 0]" {'(--interactive)-i','(-i)--interactive'}"[Select item(s) to flag from a menu of matching entries]" "--not[Flag items that *don't* match search/tag filters]" {'(--remove)-r','(-r)--remove'}"[Remove flag]" {'(--section)-s','(-s)--section'}"[Section]:SECTION_NAME:" "--search[Filter entries using a search query]:QUERY:" "--tag[Filter entries by tag]:TAG:" {'(--unfinished)-u','(-u)--unfinished'}"[Flag last entry]" "--val[Perform a tag value query]:QUERY:" {'(--exact)-x','(-x)--exact'}"[Force exact search string matching]" )
131
135
  ;;
@@ -148,6 +148,16 @@ _doing_last() {
148
148
  fi
149
149
  }
150
150
 
151
+ _doing_later() {
152
+
153
+ if [[ "$token" == --* ]]; then
154
+ COMPREPLY=( $( compgen -W '--ask --started --editor --note' -- $token ) )
155
+ elif [[ "$token" == -* ]]; then
156
+ COMPREPLY=( $( compgen -W '-e -n --ask --started --editor --note' -- $token ) )
157
+
158
+ fi
159
+ }
160
+
151
161
  _doing_mark() {
152
162
 
153
163
  if [[ "$token" == --* ]]; then
@@ -456,6 +466,7 @@ _doing()
456
466
  elif [[ $last =~ (help) ]]; then _doing_help
457
467
  elif [[ $last =~ (import) ]]; then _doing_import
458
468
  elif [[ $last =~ (last) ]]; then _doing_last
469
+ elif [[ $last =~ (later) ]]; then _doing_later
459
470
  elif [[ $last =~ (mark|flag) ]]; then _doing_mark
460
471
  elif [[ $last =~ (meanwhile) ]]; then _doing_meanwhile
461
472
  elif [[ $last =~ (note) ]]; then _doing_note
@@ -150,6 +150,7 @@ complete -xc doing -n '__fish_doing_needs_command' -a 'grep search' -d Search\ f
150
150
  complete -xc doing -n '__fish_doing_needs_command' -a 'help' -d Shows\ a\ list\ of\ commands\ or\ help\ for\ one\ command
151
151
  complete -xc doing -n '__fish_doing_needs_command' -a 'import' -d Import\ entries\ from\ an\ external\ source
152
152
  complete -xc doing -n '__fish_doing_needs_command' -a 'last' -d Show\ the\ last\ entry
153
+ complete -xc doing -n '__fish_doing_needs_command' -a 'later' -d Add\ an\ item\ to\ the\ Later\ section
153
154
  complete -xc doing -n '__fish_doing_needs_command' -a 'mark flag' -d Mark\ last\ entry\ as\ flagged
154
155
  complete -xc doing -n '__fish_doing_needs_command' -a 'meanwhile' -d Finish\ any\ running\ @meanwhile\ tasks\ and\ optionally\ create\ a\ new\ one
155
156
  complete -xc doing -n '__fish_doing_needs_command' -a 'note' -d Add\ a\ note\ to\ the\ last\ entry
@@ -326,6 +327,10 @@ complete -c doing -l template -f -r -n '__fish_doing_using_command last' -d Ove
326
327
  complete -c doing -l title -f -r -n '__fish_doing_using_command last' -d Title\ string\ to\ be\ used\ for\ output\ formats\ that\ require\ it
327
328
  complete -c doing -l val -f -r -n '__fish_doing_using_command last' -d Perform\ a\ tag\ value\ query
328
329
  complete -c doing -l exact -s x -f -n '__fish_doing_using_command last' -d Force\ exact\ search\ string\ matching
330
+ complete -c doing -l ask -f -n '__fish_doing_using_command later' -d Prompt\ for\ note\ via\ multi-line\ input
331
+ complete -c doing -l started -f -r -n '__fish_doing_using_command later' -d Backdate\ start\ time\ to\ date\ string\ \[4pm\|20m\|2h\|yesterday\ noon\]
332
+ complete -c doing -l editor -s e -f -n '__fish_doing_using_command later' -d Edit\ entry\ with\ vim
333
+ complete -c doing -l note -s n -f -r -n '__fish_doing_using_command later' -d Note
329
334
  complete -c doing -l bool -f -r -n '__fish_doing_using_command mark flag' -d Boolean\ used\ to\ combine\ multiple\ tags
330
335
  complete -c doing -l count -s c -f -r -n '__fish_doing_using_command mark flag' -d How\ many\ recent\ entries\ to\ tag
331
336
  complete -c doing -l case -f -r -n '__fish_doing_using_command mark flag' -d Case\ sensitivity\ for\ search\ string\ matching\ \[\(c\)ase-sensitive
@@ -2023,6 +2023,46 @@ const completionSpec: Fig.Spec = {
2023
2023
 
2024
2024
  },
2025
2025
 
2026
+ {
2027
+ name: "later",
2028
+ description: "Add an item to the Later section",
2029
+ options: [
2030
+ {
2031
+ name: ["--ask"],
2032
+ description: "Prompt for note via multi-line input",
2033
+
2034
+ },
2035
+
2036
+ {
2037
+ name: ["--started"],
2038
+ description: "Backdate start time to date string [4pm|20m|2h|yesterday noon]",
2039
+ args: {
2040
+ name: "DATE_STRING",
2041
+ description: "DATE_STRING",
2042
+ },
2043
+
2044
+ },
2045
+
2046
+ {
2047
+ name: ["-e", "--editor"],
2048
+ description: "Edit entry with vim",
2049
+
2050
+ },
2051
+
2052
+ {
2053
+ name: ["-n", "--note"],
2054
+ description: "Note",
2055
+ args: {
2056
+ name: "TEXT",
2057
+ description: "TEXT",
2058
+ },
2059
+
2060
+ },
2061
+
2062
+ ],
2063
+
2064
+ },
2065
+
2026
2066
  {
2027
2067
  name: "mark",
2028
2068
  description: "Mark last entry as flagged",
@@ -26,6 +26,26 @@ module Doing
26
26
  replace normalize_tag_sort(default)
27
27
  end
28
28
 
29
+ ##
30
+ ## Normalize list output style
31
+ ##
32
+ ## @param default The default
33
+ ##
34
+ ## @return [Symbol] :comma, :column, :tab, :space
35
+ ##
36
+ def normalize_list_style(default = :space)
37
+ case self
38
+ when /^com/i
39
+ :comma
40
+ when /^c/i
41
+ :column
42
+ when /^t/i
43
+ :tab
44
+ else
45
+ :space
46
+ end
47
+ end
48
+
29
49
  ##
30
50
  ## Convert an age string to a qualified type
31
51
  ##
@@ -17,7 +17,7 @@ module Doing
17
17
  def choose_from(options, prompt: 'Make a selection: ', multiple: false, sorted: true, fzf_args: [])
18
18
  return nil unless $stdout.isatty
19
19
 
20
- # fzf_args << '-1' # User is expecting a menu, and even if only one it seves as confirmation
20
+ # fzf_args << '-1' # User is expecting a menu, and even if only one it serves as confirmation
21
21
  default_args = []
22
22
  default_args << %(--prompt="#{prompt}")
23
23
  default_args << "--height=#{options.count + 2}"
data/lib/doing/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Doing
2
- VERSION = '2.1.69'
2
+ VERSION = '2.1.72'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: doing
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.69
4
+ version: 2.1.72
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brett Terpstra
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-08-28 00:00:00.000000000 Z
11
+ date: 2023-01-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: github-markup