doing 2.1.90 → 2.1.91

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 (124) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +4 -0
  3. data/Gemfile.lock +1 -1
  4. data/README.md +1 -1
  5. data/bin/commands/tags.rb +1 -1
  6. data/docs/doc/Array.html +1 -1
  7. data/docs/doc/BooleanTermParser/Clause.html +1 -1
  8. data/docs/doc/BooleanTermParser/Operator.html +1 -1
  9. data/docs/doc/BooleanTermParser/Query.html +1 -1
  10. data/docs/doc/BooleanTermParser/QueryParser.html +1 -1
  11. data/docs/doc/BooleanTermParser/QueryTransformer.html +1 -1
  12. data/docs/doc/BooleanTermParser.html +1 -1
  13. data/docs/doc/Doing/ArrayCleanup.html +1 -1
  14. data/docs/doc/Doing/ArrayNestedHash.html +1 -1
  15. data/docs/doc/Doing/ArrayTags.html +1 -1
  16. data/docs/doc/Doing/ByDayExport.html +1 -1
  17. data/docs/doc/Doing/CSVExport.html +1 -1
  18. data/docs/doc/Doing/CalendarImport.html +1 -1
  19. data/docs/doc/Doing/Change.html +1 -1
  20. data/docs/doc/Doing/Changes.html +1 -1
  21. data/docs/doc/Doing/ChronifyArray.html +1 -1
  22. data/docs/doc/Doing/ChronifyNumeric.html +1 -1
  23. data/docs/doc/Doing/ChronifyString.html +1 -1
  24. data/docs/doc/Doing/Color.html +1 -1
  25. data/docs/doc/Doing/Completion/BashCompletions.html +1 -1
  26. data/docs/doc/Doing/Completion/FigCompletions.html +1 -1
  27. data/docs/doc/Doing/Completion/FishCompletions.html +1 -1
  28. data/docs/doc/Doing/Completion/StringUtils.html +1 -1
  29. data/docs/doc/Doing/Completion/ZshCompletions.html +1 -1
  30. data/docs/doc/Doing/Completion.html +1 -1
  31. data/docs/doc/Doing/Configuration.html +1 -1
  32. data/docs/doc/Doing/DayOneRenderer.html +1 -1
  33. data/docs/doc/Doing/DayoneExport.html +1 -1
  34. data/docs/doc/Doing/DoingExport.html +1 -1
  35. data/docs/doc/Doing/DoingImport.html +1 -1
  36. data/docs/doc/Doing/Entry.html +1 -1
  37. data/docs/doc/Doing/Errors/DoingNoTraceError.html +1 -1
  38. data/docs/doc/Doing/Errors/DoingRuntimeError.html +1 -1
  39. data/docs/doc/Doing/Errors/DoingStandardError.html +1 -1
  40. data/docs/doc/Doing/Errors/EmptyInput.html +1 -1
  41. data/docs/doc/Doing/Errors/HistoryLimitError.html +1 -1
  42. data/docs/doc/Doing/Errors/InvalidPlugin.html +1 -1
  43. data/docs/doc/Doing/Errors/MissingBackupFile.html +1 -1
  44. data/docs/doc/Doing/Errors/NoResults.html +1 -1
  45. data/docs/doc/Doing/Errors/PluginException.html +1 -1
  46. data/docs/doc/Doing/Errors/UserCancelled.html +1 -1
  47. data/docs/doc/Doing/Errors/WrongCommand.html +1 -1
  48. data/docs/doc/Doing/Errors.html +1 -1
  49. data/docs/doc/Doing/HTMLExport.html +1 -1
  50. data/docs/doc/Doing/Hooks.html +1 -1
  51. data/docs/doc/Doing/Item.html +1 -1
  52. data/docs/doc/Doing/ItemDates.html +1 -1
  53. data/docs/doc/Doing/ItemQuery.html +1 -1
  54. data/docs/doc/Doing/ItemState.html +1 -1
  55. data/docs/doc/Doing/ItemTags.html +1 -1
  56. data/docs/doc/Doing/Items.html +1 -1
  57. data/docs/doc/Doing/JSONExport.html +1 -1
  58. data/docs/doc/Doing/JSONImport.html +1 -1
  59. data/docs/doc/Doing/Logger.html +1 -1
  60. data/docs/doc/Doing/MarkdownExport.html +1 -1
  61. data/docs/doc/Doing/Note.html +1 -1
  62. data/docs/doc/Doing/Pager.html +1 -1
  63. data/docs/doc/Doing/Plugins.html +1 -1
  64. data/docs/doc/Doing/Prompt.html +1 -1
  65. data/docs/doc/Doing/PromptChoose.html +1 -1
  66. data/docs/doc/Doing/PromptFZF.html +1 -1
  67. data/docs/doc/Doing/PromptInput.html +1 -1
  68. data/docs/doc/Doing/PromptSTD.html +1 -1
  69. data/docs/doc/Doing/PromptYN.html +1 -1
  70. data/docs/doc/Doing/Section.html +1 -1
  71. data/docs/doc/Doing/StringHighlight.html +1 -1
  72. data/docs/doc/Doing/StringNormalize.html +1 -1
  73. data/docs/doc/Doing/StringQuery.html +1 -1
  74. data/docs/doc/Doing/StringTags.html +1 -1
  75. data/docs/doc/Doing/StringTransform.html +1 -1
  76. data/docs/doc/Doing/StringTruncate.html +1 -1
  77. data/docs/doc/Doing/StringURL.html +1 -1
  78. data/docs/doc/Doing/SymbolNormalize.html +1 -1
  79. data/docs/doc/Doing/TaskPaperExport.html +1 -1
  80. data/docs/doc/Doing/TemplateExport.html +1 -1
  81. data/docs/doc/Doing/TemplateString.html +1 -1
  82. data/docs/doc/Doing/TimingImport.html +1 -1
  83. data/docs/doc/Doing/Types.html +1 -1
  84. data/docs/doc/Doing/Util/Backup.html +1 -1
  85. data/docs/doc/Doing/Util.html +1 -1
  86. data/docs/doc/Doing/Version.html +1 -1
  87. data/docs/doc/Doing/WWID.html +1 -1
  88. data/docs/doc/Doing.html +2 -2
  89. data/docs/doc/FalseClass.html +1 -1
  90. data/docs/doc/GLI/Commands/Help.html +1 -1
  91. data/docs/doc/GLI/Commands/MarkdownDocumentListener.html +1 -1
  92. data/docs/doc/GLI/Commands.html +1 -1
  93. data/docs/doc/GLI.html +1 -1
  94. data/docs/doc/Hash.html +1 -1
  95. data/docs/doc/Numeric.html +1 -1
  96. data/docs/doc/Object.html +1 -1
  97. data/docs/doc/PhraseParser/Operator.html +1 -1
  98. data/docs/doc/PhraseParser/PhraseClause.html +1 -1
  99. data/docs/doc/PhraseParser/Query.html +1 -1
  100. data/docs/doc/PhraseParser/QueryParser.html +1 -1
  101. data/docs/doc/PhraseParser/QueryTransformer.html +1 -1
  102. data/docs/doc/PhraseParser/TermClause.html +1 -1
  103. data/docs/doc/PhraseParser.html +1 -1
  104. data/docs/doc/Status.html +1 -1
  105. data/docs/doc/String.html +1 -1
  106. data/docs/doc/Symbol.html +1 -1
  107. data/docs/doc/Time.html +1 -1
  108. data/docs/doc/TrueClass.html +1 -1
  109. data/docs/doc/_index.html +1 -1
  110. data/docs/doc/file.README.html +2 -2
  111. data/docs/doc/index.html +2 -2
  112. data/docs/doc/top-level-namespace.html +1 -1
  113. data/doing.rdoc +1 -30
  114. data/lib/completion/_doing.zsh +0 -4
  115. data/lib/completion/doing.bash +0 -11
  116. data/lib/completion/doing.fish +0 -5
  117. data/lib/completion/doing.ts +0 -40
  118. data/lib/doing/item/item.rb +1 -1
  119. data/lib/doing/item/query.rb +4 -4
  120. data/lib/doing/prompt/input.rb +7 -7
  121. data/lib/doing/version.rb +1 -1
  122. data/lib/doing/wwid/interactive.rb +1 -1
  123. data/lib/doing/wwid/modify.rb +2 -2
  124. metadata +1 -1
@@ -27,7 +27,6 @@ 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'
31
30
  'mark:Mark last entry as flagged'
32
31
  'flag:Mark last entry as flagged'
33
32
  'meanwhile:Finish any running @meanwhile tasks and optionally create a new one'
@@ -128,9 +127,6 @@ function _doing() {
128
127
  last)
129
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]" )
130
129
  ;;
131
- later)
132
- 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:" )
133
- ;;
134
130
  mark)
135
131
  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]" )
136
132
  ;;
@@ -148,16 +148,6 @@ _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
-
161
151
  _doing_mark() {
162
152
 
163
153
  if [[ "$token" == --* ]]; then
@@ -476,7 +466,6 @@ _doing()
476
466
  elif [[ $last =~ (help) ]]; then _doing_help
477
467
  elif [[ $last =~ (import) ]]; then _doing_import
478
468
  elif [[ $last =~ (last) ]]; then _doing_last
479
- elif [[ $last =~ (later) ]]; then _doing_later
480
469
  elif [[ $last =~ (mark|flag) ]]; then _doing_mark
481
470
  elif [[ $last =~ (meanwhile) ]]; then _doing_meanwhile
482
471
  elif [[ $last =~ (note) ]]; then _doing_note
@@ -150,7 +150,6 @@ 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
154
153
  complete -xc doing -n '__fish_doing_needs_command' -a 'mark flag' -d Mark\ last\ entry\ as\ flagged
155
154
  complete -xc doing -n '__fish_doing_needs_command' -a 'meanwhile' -d Finish\ any\ running\ @meanwhile\ tasks\ and\ optionally\ create\ a\ new\ one
156
155
  complete -xc doing -n '__fish_doing_needs_command' -a 'note' -d Add\ a\ note\ to\ the\ last\ entry
@@ -328,10 +327,6 @@ complete -c doing -l template -f -r -n '__fish_doing_using_command last' -d Ove
328
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
329
328
  complete -c doing -l val -f -r -n '__fish_doing_using_command last' -d Perform\ a\ tag\ value\ query
330
329
  complete -c doing -l exact -s x -f -n '__fish_doing_using_command last' -d Force\ exact\ search\ string\ matching
331
- complete -c doing -l ask -f -n '__fish_doing_using_command later' -d Prompt\ for\ note\ via\ multi-line\ input
332
- 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\]
333
- complete -c doing -l editor -s e -f -n '__fish_doing_using_command later' -d Edit\ entry\ with\ vim
334
- complete -c doing -l note -s n -f -r -n '__fish_doing_using_command later' -d Note
335
330
  complete -c doing -l bool -f -r -n '__fish_doing_using_command mark flag' -d Boolean\ used\ to\ combine\ multiple\ tags
336
331
  complete -c doing -l count -s c -f -r -n '__fish_doing_using_command mark flag' -d How\ many\ recent\ entries\ to\ tag
337
332
  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,46 +2023,6 @@ 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
-
2066
2026
  {
2067
2027
  name: "mark",
2068
2028
  description: "Mark last entry as flagged",
@@ -105,7 +105,7 @@ module Doing
105
105
  when :date
106
106
  output << format('%13s |', @date.relative_date).cyan
107
107
  when :section
108
- output << "#{magenta}(#{white(@section)}#{magenta})"
108
+ output << "#{Color.magenta}(#{Color.white(@section)}#{Color.magenta})"
109
109
  when :title
110
110
  output << @title.white.highlight_tags('cyan')
111
111
  end
@@ -78,8 +78,8 @@ module Doing
78
78
 
79
79
  if search.rx? || matching == :fuzzy
80
80
  rx = search.to_rx(distance: distance, case_type: case_type)
81
- new_title = @title.gsub(rx) { |m| yellow(m) }
82
- new_note.add(@note.to_s.gsub(rx) { |m| yellow(m) })
81
+ new_title = @title.gsub(rx) { |m| Color.yellow(m) }
82
+ new_note.add(@note.to_s.gsub(rx) { |m| Color.yellow(m) })
83
83
  else
84
84
  query = search.strip.to_phrase_query
85
85
 
@@ -89,8 +89,8 @@ module Doing
89
89
  end
90
90
  query[:must].concat(query[:should]).each do |s|
91
91
  rx = Regexp.new(s.wildcard_to_rx, ignore_case(s, case_type))
92
- new_title = @title.gsub(rx) { |m| yellow(m) }
93
- new_note.add(@note.to_s.gsub(rx) { |m| yellow(m) })
92
+ new_title = @title.gsub(rx) { |m| Color.yellow(m) }
93
+ new_note.add(@note.to_s.gsub(rx) { |m| Color.yellow(m) })
94
94
  end
95
95
  end
96
96
 
@@ -20,7 +20,7 @@ module Doing
20
20
  $stdin.reopen('/dev/tty')
21
21
  return default_response if @default_answer
22
22
 
23
- print "#{yellow(prompt).sub(/:?$/, ':')} #{reset}"
23
+ print "#{Color.yellow(prompt).sub(/:?$/, ':')} #{Color.reset}"
24
24
  $stdin.gets.strip
25
25
  end
26
26
 
@@ -50,7 +50,7 @@ module Doing
50
50
  end
51
51
 
52
52
  begin
53
- Readline.readline("#{yellow(prompt).sub(/:?$/, ':')} #{reset}", true).strip
53
+ Readline.readline("#{Color.yellow(prompt).sub(/:?$/, ':')} #{Color.reset}", true).strip
54
54
  rescue Interrupt
55
55
  raise UserCancelled
56
56
  end
@@ -82,8 +82,8 @@ module Doing
82
82
  '(%<keycolor>sreturn twice%<textcolor>s)',
83
83
  'to end editing and save,',
84
84
  '%<keycolor>sCTRL-C%<textcolor>s to cancel%<reset>s'].join(' '),
85
- { promptcolor: boldgreen, prompt: prompt.sub(/:?$/, ':'),
86
- textcolor: yellow, keycolor: boldwhite, reset: reset })
85
+ { promptcolor: Color.boldgreen, prompt: prompt.sub(/:?$/, ':'),
86
+ textcolor: Color.yellow, keycolor: Color.boldwhite, reset: Color.reset })
87
87
 
88
88
  res = []
89
89
 
@@ -116,10 +116,10 @@ module Doing
116
116
 
117
117
  ask_note = []
118
118
  reader = TTY::Reader.new(interrupt: -> { raise Errors::UserCancelled }, track_history: false)
119
- puts "#{boldgreen(prompt.sub(/:?$/,
120
- ':'))} #{yellow('Hit return for a new line, ')}#{boldwhite('enter a blank line (')}#{boldyellow('return twice')}#{boldwhite(') to end editing')}"
119
+ puts "#{Color.boldgreen(prompt.sub(/:?$/,
120
+ ':'))} #{Color.yellow('Hit return for a new line, ')}#{Color.boldwhite('enter a blank line (')}#{Color.boldyellow('return twice')}#{Color.boldwhite(') to end editing')}"
121
121
  loop do
122
- res = reader.read_line(green('> '))
122
+ res = reader.read_line(Color.green('> '))
123
123
  break if res.strip.empty?
124
124
 
125
125
  ask_note.push(res)
data/lib/doing/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Doing
4
- VERSION = '2.1.90'
4
+ VERSION = '2.1.91'
5
5
  end
@@ -365,7 +365,7 @@ module Doing
365
365
  elapsed = finish_date - date
366
366
 
367
367
  if max_elapsed.positive? && (elapsed > max_elapsed)
368
- puts boldwhite(title) if title
368
+ puts Color.boldwhite(title) if title
369
369
  human = elapsed.time_string(format: :natural)
370
370
  res = Prompt.yn(Color.yellow("Did this entry actually take #{human}"), default_response: true)
371
371
  unless res
@@ -266,7 +266,7 @@ module Doing
266
266
  elapsed = done_date - item.date
267
267
 
268
268
  if max_elapsed.positive? && (elapsed > max_elapsed) && !opt[:took]
269
- puts boldwhite(item.title)
269
+ puts Color.boldwhite(item.title)
270
270
  human = elapsed.time_string(format: :natural)
271
271
  res = Prompt.yn(Color.yellow("Did this actually take #{human}"), default_response: true)
272
272
  unless res
@@ -399,7 +399,7 @@ module Doing
399
399
  ##
400
400
  def delete_items(items, force: false)
401
401
  items.slice(0, 5).each { |i| puts i.to_pretty } unless force
402
- puts softpurple("+ #{items.size - 5} additional #{'item'.to_p(items.size - 5)}") if items.size > 5 && !force
402
+ puts Color.softpurple("+ #{items.size - 5} additional #{'item'.to_p(items.size - 5)}") if items.size > 5 && !force
403
403
 
404
404
  res = force ? true : Prompt.yn("Delete #{items.size} #{'item'.to_p(items.size)}?", default_response: 'y')
405
405
  return unless res
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: doing
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.90
4
+ version: 2.1.91
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brett Terpstra