doing 2.1.76 → 2.1.78

Sign up to get free protection for your applications and to get access to all the features.
Files changed (116) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +17 -0
  3. data/Gemfile.lock +2 -2
  4. data/README.md +1 -1
  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/ByDayExport.html +206 -0
  16. data/docs/doc/Doing/CSVExport.html +1 -1
  17. data/docs/doc/Doing/CalendarImport.html +1 -1
  18. data/docs/doc/Doing/Change.html +1 -1
  19. data/docs/doc/Doing/Changes.html +1 -1
  20. data/docs/doc/Doing/ChronifyArray.html +1 -1
  21. data/docs/doc/Doing/ChronifyNumeric.html +1 -1
  22. data/docs/doc/Doing/ChronifyString.html +1 -1
  23. data/docs/doc/Doing/Color.html +1 -1
  24. data/docs/doc/Doing/Completion/BashCompletions.html +1 -1
  25. data/docs/doc/Doing/Completion/FigCompletions.html +1 -1
  26. data/docs/doc/Doing/Completion/FishCompletions.html +1 -1
  27. data/docs/doc/Doing/Completion/StringUtils.html +1 -1
  28. data/docs/doc/Doing/Completion/ZshCompletions.html +1 -1
  29. data/docs/doc/Doing/Completion.html +1 -1
  30. data/docs/doc/Doing/Configuration.html +1 -1
  31. data/docs/doc/Doing/DayOneRenderer.html +1 -1
  32. data/docs/doc/Doing/DayoneExport.html +1 -1
  33. data/docs/doc/Doing/DoingExport.html +1 -1
  34. data/docs/doc/Doing/DoingImport.html +1 -1
  35. data/docs/doc/Doing/Entry.html +1 -1
  36. data/docs/doc/Doing/Errors/DoingNoTraceError.html +1 -1
  37. data/docs/doc/Doing/Errors/DoingRuntimeError.html +1 -1
  38. data/docs/doc/Doing/Errors/DoingStandardError.html +1 -1
  39. data/docs/doc/Doing/Errors/EmptyInput.html +1 -1
  40. data/docs/doc/Doing/Errors/HistoryLimitError.html +1 -1
  41. data/docs/doc/Doing/Errors/InvalidPlugin.html +1 -1
  42. data/docs/doc/Doing/Errors/MissingBackupFile.html +1 -1
  43. data/docs/doc/Doing/Errors/NoResults.html +1 -1
  44. data/docs/doc/Doing/Errors/PluginException.html +1 -1
  45. data/docs/doc/Doing/Errors/UserCancelled.html +1 -1
  46. data/docs/doc/Doing/Errors/WrongCommand.html +1 -1
  47. data/docs/doc/Doing/Errors.html +1 -1
  48. data/docs/doc/Doing/HTMLExport.html +1 -1
  49. data/docs/doc/Doing/Hooks.html +1 -1
  50. data/docs/doc/Doing/Item.html +1 -1
  51. data/docs/doc/Doing/ItemDates.html +1 -1
  52. data/docs/doc/Doing/ItemQuery.html +1 -1
  53. data/docs/doc/Doing/ItemState.html +1 -1
  54. data/docs/doc/Doing/ItemTags.html +1 -1
  55. data/docs/doc/Doing/Items.html +1 -1
  56. data/docs/doc/Doing/JSONExport.html +1 -1
  57. data/docs/doc/Doing/JSONImport.html +1 -1
  58. data/docs/doc/Doing/Logger.html +1 -1
  59. data/docs/doc/Doing/MarkdownExport.html +1 -1
  60. data/docs/doc/Doing/Note.html +1 -1
  61. data/docs/doc/Doing/Pager.html +1 -1
  62. data/docs/doc/Doing/Plugins.html +1 -1
  63. data/docs/doc/Doing/Prompt.html +1 -1
  64. data/docs/doc/Doing/PromptChoose.html +1 -1
  65. data/docs/doc/Doing/PromptFZF.html +1 -1
  66. data/docs/doc/Doing/PromptInput.html +1 -1
  67. data/docs/doc/Doing/PromptSTD.html +1 -1
  68. data/docs/doc/Doing/PromptYN.html +1 -1
  69. data/docs/doc/Doing/Section.html +1 -1
  70. data/docs/doc/Doing/StringHighlight.html +1 -1
  71. data/docs/doc/Doing/StringNormalize.html +1 -1
  72. data/docs/doc/Doing/StringQuery.html +1 -1
  73. data/docs/doc/Doing/StringTags.html +1 -1
  74. data/docs/doc/Doing/StringTransform.html +1 -1
  75. data/docs/doc/Doing/StringTruncate.html +1 -1
  76. data/docs/doc/Doing/StringURL.html +1 -1
  77. data/docs/doc/Doing/SymbolNormalize.html +1 -1
  78. data/docs/doc/Doing/TaskPaperExport.html +1 -1
  79. data/docs/doc/Doing/TemplateExport.html +1 -1
  80. data/docs/doc/Doing/TemplateString.html +1 -1
  81. data/docs/doc/Doing/TimingImport.html +1 -1
  82. data/docs/doc/Doing/Types.html +1 -1
  83. data/docs/doc/Doing/Util/Backup.html +1 -1
  84. data/docs/doc/Doing/Util.html +1 -1
  85. data/docs/doc/Doing/Version.html +1 -1
  86. data/docs/doc/Doing/WWID.html +1 -1
  87. data/docs/doc/Doing.html +2 -2
  88. data/docs/doc/FalseClass.html +1 -1
  89. data/docs/doc/GLI/Commands/Help.html +1 -1
  90. data/docs/doc/GLI/Commands/MarkdownDocumentListener.html +1 -1
  91. data/docs/doc/GLI/Commands.html +1 -1
  92. data/docs/doc/GLI.html +1 -1
  93. data/docs/doc/Hash.html +1 -1
  94. data/docs/doc/Numeric.html +1 -1
  95. data/docs/doc/Object.html +1 -1
  96. data/docs/doc/PhraseParser/Operator.html +1 -1
  97. data/docs/doc/PhraseParser/PhraseClause.html +1 -1
  98. data/docs/doc/PhraseParser/Query.html +1 -1
  99. data/docs/doc/PhraseParser/QueryParser.html +1 -1
  100. data/docs/doc/PhraseParser/QueryTransformer.html +1 -1
  101. data/docs/doc/PhraseParser/TermClause.html +1 -1
  102. data/docs/doc/PhraseParser.html +1 -1
  103. data/docs/doc/Status.html +1 -1
  104. data/docs/doc/String.html +1 -1
  105. data/docs/doc/Symbol.html +1 -1
  106. data/docs/doc/Time.html +1 -1
  107. data/docs/doc/TrueClass.html +1 -1
  108. data/docs/doc/_index.html +1 -1
  109. data/docs/doc/file.README.html +2 -2
  110. data/docs/doc/index.html +2 -2
  111. data/docs/doc/top-level-namespace.html +1 -1
  112. data/doing.rdoc +1 -1
  113. data/lib/doing/colors.rb +4 -3
  114. data/lib/doing/plugins/export/byday.rb +15 -10
  115. data/lib/doing/version.rb +1 -1
  116. metadata +3 -2
@@ -105,7 +105,7 @@
105
105
  </div>
106
106
 
107
107
  <div id="footer">
108
- Generated on Fri Mar 10 15:19:58 2023 by
108
+ Generated on Sat Mar 11 06:08:17 2023 by
109
109
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
110
110
  0.9.28 (ruby-3.0.1).
111
111
  </div>
data/docs/doc/Status.html CHANGED
@@ -316,7 +316,7 @@
316
316
  </div>
317
317
 
318
318
  <div id="footer">
319
- Generated on Fri Mar 10 15:19:58 2023 by
319
+ Generated on Sat Mar 11 06:08:17 2023 by
320
320
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
321
321
  0.9.28 (ruby-3.0.1).
322
322
  </div>
data/docs/doc/String.html CHANGED
@@ -679,7 +679,7 @@ be recognized, e.g. %greensomething still finds
679
679
  </div>
680
680
 
681
681
  <div id="footer">
682
- Generated on Fri Mar 10 15:19:58 2023 by
682
+ Generated on Sat Mar 11 06:08:17 2023 by
683
683
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
684
684
  0.9.28 (ruby-3.0.1).
685
685
  </div>
data/docs/doc/Symbol.html CHANGED
@@ -127,7 +127,7 @@
127
127
  </div>
128
128
 
129
129
  <div id="footer">
130
- Generated on Fri Mar 10 15:19:58 2023 by
130
+ Generated on Sat Mar 11 06:08:18 2023 by
131
131
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
132
132
  0.9.28 (ruby-3.0.1).
133
133
  </div>
data/docs/doc/Time.html CHANGED
@@ -411,7 +411,7 @@ entries get month/day/year/time</p>
411
411
  </div>
412
412
 
413
413
  <div id="footer">
414
- Generated on Fri Mar 10 15:19:58 2023 by
414
+ Generated on Sat Mar 11 06:08:17 2023 by
415
415
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
416
416
  0.9.28 (ruby-3.0.1).
417
417
  </div>
@@ -235,7 +235,7 @@ has content</p>
235
235
  </div>
236
236
 
237
237
  <div id="footer">
238
- Generated on Fri Mar 10 15:19:58 2023 by
238
+ Generated on Sat Mar 11 06:08:17 2023 by
239
239
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
240
240
  0.9.28 (ruby-3.0.1).
241
241
  </div>
data/docs/doc/_index.html CHANGED
@@ -961,7 +961,7 @@
961
961
  </div>
962
962
 
963
963
  <div id="footer">
964
- Generated on Fri Mar 10 15:19:57 2023 by
964
+ Generated on Sat Mar 11 06:08:17 2023 by
965
965
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
966
966
  0.9.28 (ruby-3.0.1).
967
967
  </div>
@@ -71,7 +71,7 @@ you&#39;ve done.</strong></p>
71
71
 
72
72
  <!--README-->
73
73
 
74
- <p>The current version of <code>doing</code> is &lt;!--VER--&gt;2.1.75&lt;!--END VER--&gt;.</p>
74
+ <p>The current version of <code>doing</code> is &lt;!--VER--&gt;2.1.77&lt;!--END VER--&gt;.</p>
75
75
 
76
76
  <p>Find all of the documentation in the <a href="https://github.com/ttscoff/doing/wiki">doing wiki</a>.</p>
77
77
 
@@ -153,7 +153,7 @@ with changes. Please target the <code>develop</code> branch with pull requests.<
153
153
  </div></div>
154
154
 
155
155
  <div id="footer">
156
- Generated on Fri Mar 10 15:19:57 2023 by
156
+ Generated on Sat Mar 11 06:08:17 2023 by
157
157
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
158
158
  0.9.28 (ruby-3.0.1).
159
159
  </div>
data/docs/doc/index.html CHANGED
@@ -71,7 +71,7 @@ you&#39;ve done.</strong></p>
71
71
 
72
72
  <!--README-->
73
73
 
74
- <p>The current version of <code>doing</code> is &lt;!--VER--&gt;2.1.75&lt;!--END VER--&gt;.</p>
74
+ <p>The current version of <code>doing</code> is &lt;!--VER--&gt;2.1.77&lt;!--END VER--&gt;.</p>
75
75
 
76
76
  <p>Find all of the documentation in the <a href="https://github.com/ttscoff/doing/wiki">doing wiki</a>.</p>
77
77
 
@@ -153,7 +153,7 @@ with changes. Please target the <code>develop</code> branch with pull requests.<
153
153
  </div></div>
154
154
 
155
155
  <div id="footer">
156
- Generated on Fri Mar 10 15:19:57 2023 by
156
+ Generated on Sat Mar 11 06:08:17 2023 by
157
157
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
158
158
  0.9.28 (ruby-3.0.1).
159
159
  </div>
@@ -216,7 +216,7 @@
216
216
  </div>
217
217
 
218
218
  <div id="footer">
219
- Generated on Fri Mar 10 15:19:57 2023 by
219
+ Generated on Sat Mar 11 06:08:17 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.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.76
8
+ v2.1.78
9
9
 
10
10
  === Global Options
11
11
  === --config_file arg
data/lib/doing/colors.rb CHANGED
@@ -223,7 +223,8 @@ module Doing
223
223
  ##
224
224
  def template(input)
225
225
  input = input.join(' ') if input.is_a? Array
226
- fmt = input.gsub(/\{(\w+)\}/) do
226
+ fmt = input.gsub(/%/, '%%')
227
+ fmt = fmt.gsub(/(?<!\\u|\$)\{(\w+)\}/i) do
227
228
  Regexp.last_match(1).split('').map { |c| "%<#{c}>s" }.join('')
228
229
  end
229
230
 
@@ -231,9 +232,9 @@ module Doing
231
232
  y: yellow, c: cyan, m: magenta, r: red,
232
233
  W: bgwhite, K: bgblack, G: bggreen, L: bgblue,
233
234
  Y: bgyellow, C: bgcyan, M: bgmagenta, R: bgred,
234
- b: bold, u: underline, i: italic, x: reset }
235
+ d: dark, b: bold, u: underline, i: italic, x: reset }
235
236
 
236
- format(fmt, colors)
237
+ fmt.empty? ? input : format(fmt, colors)
237
238
  end
238
239
  end
239
240
 
@@ -1,14 +1,17 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # title: Doing File Export
4
- # description: Export Doing format data
3
+ # title: By Day Export
4
+ # description: Export a table of items grouped by day with daily totals
5
5
  # author: Brett Terpstra
6
6
  # url: https://brettterpstra.com
7
7
  module Doing
8
8
  class ByDayExport
9
9
  def self.settings
10
10
  {
11
- trigger: 'byday'
11
+ trigger: 'byday',
12
+ config: {
13
+ 'item_width' => 60
14
+ }
12
15
  }
13
16
  end
14
17
 
@@ -34,28 +37,30 @@ module Doing
34
37
  total += duration
35
38
  end
36
39
  end
37
-
38
- divider = "+----------+------------------------------------------------------------------------------------------------+--------+"
40
+ width = wwid.config['plugins']['byday']['item_width'].to_i || 60
41
+ divider = "{wd}+{xk}#{'-' *10}{wd}+{xk}#{'-' * width}{wd}+{xk}#{'-' * 8}{wd}+{x}"
39
42
  out = []
40
43
  out << divider
44
+ out << '{wd}|{xm}date {wd}|{xbw}item#{' ' * (width - 4)}{wd}|{xy}duration{wd}|{x}'
45
+ out << divider
41
46
  days.each do |day, day_items|
42
47
  first = day_items.slice!(0, 1)[0]
43
48
  interval = wwid.get_interval(first, formatted: true) || '00:00:00'
44
- out << "|#{day}|#{first.title.trunc(94).ljust(96)}|#{interval}|"
49
+ out << "{wd}|{xm}#{day}{wd}|{xbw}#{first.title.tag('done', remove: true).trunc(width - 2).ljust(width)}{wd}|{xy}#{interval}{wd}|{x}"
45
50
  day_items.each do |item|
46
51
  interval = wwid.get_interval(item, formatted: true) || '00:00:00'
47
- out << "| |#{item.title.trunc(94).ljust(96)}|#{interval}|"
52
+ out << "{wd}| |{xbw}#{item.title.tag('done', remove: true).trunc(width - 2).ljust(width)}{wd}|{xy}#{interval}{wd}|{x}"
48
53
  end
49
54
  day_total = "Total: #{totals[day].time_string(format: :clock)}"
50
55
  out << divider
51
- out << "|#{day_total.rjust(116)}|"
56
+ out << "{wd}|{xg}#{day_total.rjust(width + 20)}{wd}|{x}"
52
57
  out << divider
53
58
  end
54
59
  all_total = "Grand Total: #{total.time_string(format: :clock)}"
55
60
  out << divider
56
- out << "|#{all_total.rjust(116)}|"
61
+ out << "{wd}|{xrb}#{all_total.rjust(width + 20)}{wd}|{x}"
57
62
  out << divider
58
- Doing::Pager.page out.join("\n")
63
+ Doing::Pager.page Doing::Color.template(out.join("\n"))
59
64
  end
60
65
 
61
66
  Doing::Plugins.register 'byday', :export, self
data/lib/doing/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Doing
2
- VERSION = '2.1.76'
2
+ VERSION = '2.1.78'
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.76
4
+ version: 2.1.78
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brett Terpstra
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-03-10 00:00:00.000000000 Z
11
+ date: 2023-03-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: github-markup
@@ -494,6 +494,7 @@ files:
494
494
  - docs/doc/Doing/ArrayCleanup.html
495
495
  - docs/doc/Doing/ArrayNestedHash.html
496
496
  - docs/doc/Doing/ArrayTags.html
497
+ - docs/doc/Doing/ByDayExport.html
497
498
  - docs/doc/Doing/CLIFormat.html
498
499
  - docs/doc/Doing/CSVExport.html
499
500
  - docs/doc/Doing/CalendarImport.html