doing 2.1.80 → 2.1.81
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/Gemfile.lock +13 -15
- data/README.md +1 -1
- data/bin/commands/again.rb +1 -1
- data/bin/commands/archive.rb +1 -1
- data/bin/commands/cancel.rb +1 -1
- data/bin/commands/finish.rb +1 -1
- data/bin/commands/flag.rb +1 -1
- data/bin/commands/grep.rb +3 -2
- data/bin/commands/last.rb +1 -1
- data/bin/commands/note.rb +1 -1
- data/bin/commands/on.rb +1 -1
- data/bin/commands/recent.rb +1 -1
- data/bin/commands/reset.rb +1 -1
- data/bin/commands/select.rb +1 -1
- data/bin/commands/show.rb +5 -3
- data/bin/commands/since.rb +1 -1
- data/bin/commands/tag.rb +9 -16
- data/bin/commands/tags.rb +1 -1
- data/bin/commands/today.rb +1 -1
- data/bin/commands/view.rb +1 -1
- data/bin/commands/views.rb +1 -1
- data/bin/commands/yesterday.rb +1 -1
- data/docs/doc/Array.html +66 -4
- data/docs/doc/BooleanTermParser/Clause.html +3 -3
- data/docs/doc/BooleanTermParser/Operator.html +3 -3
- data/docs/doc/BooleanTermParser/Query.html +3 -3
- data/docs/doc/BooleanTermParser/QueryParser.html +3 -3
- data/docs/doc/BooleanTermParser/QueryTransformer.html +3 -3
- data/docs/doc/BooleanTermParser.html +3 -3
- data/docs/doc/Doing/ArrayCleanup.html +3 -3
- data/docs/doc/Doing/ArrayNestedHash.html +3 -3
- data/docs/doc/Doing/ArrayTags.html +3 -3
- data/docs/doc/Doing/ByDayExport.html +3 -3
- data/docs/doc/Doing/CSVExport.html +3 -3
- data/docs/doc/Doing/CalendarImport.html +3 -3
- data/docs/doc/Doing/Change.html +3 -3
- data/docs/doc/Doing/Changes.html +3 -3
- data/docs/doc/Doing/ChronifyArray.html +3 -3
- data/docs/doc/Doing/ChronifyNumeric.html +3 -3
- data/docs/doc/Doing/ChronifyString.html +3 -3
- data/docs/doc/Doing/Color.html +3 -19
- data/docs/doc/Doing/Completion/BashCompletions.html +3 -3
- data/docs/doc/Doing/Completion/FigCompletions.html +3 -3
- data/docs/doc/Doing/Completion/FishCompletions.html +3 -3
- data/docs/doc/Doing/Completion/StringUtils.html +3 -3
- data/docs/doc/Doing/Completion/ZshCompletions.html +3 -3
- data/docs/doc/Doing/Completion.html +3 -3
- data/docs/doc/Doing/Configuration.html +3 -3
- data/docs/doc/Doing/DayOneRenderer.html +3 -3
- data/docs/doc/Doing/DayoneExport.html +3 -3
- data/docs/doc/Doing/DoingExport.html +3 -3
- data/docs/doc/Doing/DoingImport.html +3 -3
- data/docs/doc/Doing/Entry.html +3 -3
- data/docs/doc/Doing/Errors/DoingNoTraceError.html +3 -3
- data/docs/doc/Doing/Errors/DoingRuntimeError.html +3 -3
- data/docs/doc/Doing/Errors/DoingStandardError.html +3 -3
- data/docs/doc/Doing/Errors/EmptyInput.html +3 -3
- data/docs/doc/Doing/Errors/HistoryLimitError.html +3 -3
- data/docs/doc/Doing/Errors/InvalidPlugin.html +3 -3
- data/docs/doc/Doing/Errors/MissingBackupFile.html +3 -3
- data/docs/doc/Doing/Errors/NoResults.html +3 -3
- data/docs/doc/Doing/Errors/PluginException.html +3 -3
- data/docs/doc/Doing/Errors/UserCancelled.html +3 -3
- data/docs/doc/Doing/Errors/WrongCommand.html +3 -3
- data/docs/doc/Doing/Errors.html +3 -3
- data/docs/doc/Doing/HTMLExport.html +3 -3
- data/docs/doc/Doing/Hooks.html +3 -3
- data/docs/doc/Doing/Item.html +4 -4
- data/docs/doc/Doing/ItemDates.html +3 -3
- data/docs/doc/Doing/ItemQuery.html +3 -3
- data/docs/doc/Doing/ItemState.html +3 -3
- data/docs/doc/Doing/ItemTags.html +3 -3
- data/docs/doc/Doing/Items.html +4 -4
- data/docs/doc/Doing/JSONExport.html +3 -3
- data/docs/doc/Doing/JSONImport.html +3 -3
- data/docs/doc/Doing/Logger.html +3 -3
- data/docs/doc/Doing/MarkdownExport.html +3 -3
- data/docs/doc/Doing/Note.html +4 -4
- data/docs/doc/Doing/Pager.html +3 -3
- data/docs/doc/Doing/Plugins.html +3 -3
- data/docs/doc/Doing/Prompt.html +4 -4
- data/docs/doc/Doing/PromptChoose.html +3 -3
- data/docs/doc/Doing/PromptFZF.html +3 -3
- data/docs/doc/Doing/PromptInput.html +3 -3
- data/docs/doc/Doing/PromptSTD.html +3 -3
- data/docs/doc/Doing/PromptYN.html +3 -3
- data/docs/doc/Doing/Section.html +3 -3
- data/docs/doc/Doing/StringHighlight.html +3 -3
- data/docs/doc/Doing/StringNormalize.html +3 -3
- data/docs/doc/Doing/StringQuery.html +3 -3
- data/docs/doc/Doing/StringTags.html +3 -3
- data/docs/doc/Doing/StringTransform.html +3 -3
- data/docs/doc/Doing/StringTruncate.html +3 -3
- data/docs/doc/Doing/StringURL.html +3 -3
- data/docs/doc/Doing/SymbolNormalize.html +3 -3
- data/docs/doc/Doing/TaskPaperExport.html +3 -3
- data/docs/doc/Doing/TemplateExport.html +4 -4
- data/docs/doc/Doing/TemplateString.html +4 -4
- data/docs/doc/Doing/TimingImport.html +3 -3
- data/docs/doc/Doing/Types.html +3 -3
- data/docs/doc/Doing/Util/Backup.html +3 -3
- data/docs/doc/Doing/Util.html +3 -3
- data/docs/doc/Doing/Version.html +3 -3
- data/docs/doc/Doing/WWID.html +4 -4
- data/docs/doc/Doing.html +4 -4
- data/docs/doc/FalseClass.html +3 -3
- data/docs/doc/GLI/Commands/Help.html +3 -3
- data/docs/doc/GLI/Commands/MarkdownDocumentListener.html +3 -3
- data/docs/doc/GLI/Commands.html +3 -3
- data/docs/doc/GLI.html +3 -3
- data/docs/doc/Hash.html +3 -3
- data/docs/doc/Numeric.html +3 -3
- data/docs/doc/Object.html +3 -3
- data/docs/doc/PhraseParser/Operator.html +3 -3
- data/docs/doc/PhraseParser/PhraseClause.html +3 -3
- data/docs/doc/PhraseParser/Query.html +3 -3
- data/docs/doc/PhraseParser/QueryParser.html +3 -3
- data/docs/doc/PhraseParser/QueryTransformer.html +3 -3
- data/docs/doc/PhraseParser/TermClause.html +3 -3
- data/docs/doc/PhraseParser.html +3 -3
- data/docs/doc/Status.html +3 -3
- data/docs/doc/String.html +4 -4
- data/docs/doc/Symbol.html +3 -3
- data/docs/doc/Time.html +3 -3
- data/docs/doc/TrueClass.html +3 -3
- data/docs/doc/_index.html +4 -4
- data/docs/doc/file.README.html +4 -4
- data/docs/doc/frames.html +1 -1
- data/docs/doc/index.html +4 -4
- data/docs/doc/method_list.html +605 -597
- data/docs/doc/top-level-namespace.html +3 -3
- data/doing.rdoc +2 -2
- data/lib/doing/array/array.rb +9 -0
- data/lib/doing/colors.rb +3 -7
- data/lib/doing/item/query.rb +3 -3
- data/lib/doing/version.rb +1 -1
- data/lib/doing/wwid/display.rb +5 -2
- data/lib/doing/wwid/filetools.rb +1 -0
- data/lib/doing/wwid/filter.rb +9 -2
- data/lib/doing/wwid/guess.rb +13 -2
- data/lib/doing/wwid/interactive.rb +2 -1
- data/lib/doing/wwid/modify.rb +2 -1
- data/lib/doing.rb +2 -2
- data/lib/examples/commands/autotag.rb +1 -1
- data/lib/examples/commands/wiki.rb +1 -1
- metadata +3 -3
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<title>
|
|
7
7
|
Top Level Namespace
|
|
8
8
|
|
|
9
|
-
— Documentation by YARD 0.9.
|
|
9
|
+
— Documentation by YARD 0.9.34
|
|
10
10
|
|
|
11
11
|
</title>
|
|
12
12
|
|
|
@@ -216,9 +216,9 @@
|
|
|
216
216
|
</div>
|
|
217
217
|
|
|
218
218
|
<div id="footer">
|
|
219
|
-
Generated on
|
|
219
|
+
Generated on Wed May 31 15:49:41 2023 by
|
|
220
220
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
221
|
-
0.9.
|
|
221
|
+
0.9.34 (ruby-3.2.0).
|
|
222
222
|
</div>
|
|
223
223
|
|
|
224
224
|
</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.
|
|
8
|
+
v2.1.81
|
|
9
9
|
|
|
10
10
|
=== Global Options
|
|
11
11
|
=== --config_file arg
|
|
@@ -889,7 +889,7 @@ Force exact search string matching (case sensitive)
|
|
|
889
889
|
==== Command: <tt>grep|search SEARCH_PATTERN</tt>
|
|
890
890
|
Search for entries
|
|
891
891
|
|
|
892
|
-
Search all sections (or limit to a
|
|
892
|
+
Search all sections (or limit to a specific sections) for entries matching text or regular expression. Normal strings are fuzzy matched.
|
|
893
893
|
|
|
894
894
|
To search with regular expressions, single quote the string and surround with slashes: `doing search '/m.*?x/'`
|
|
895
895
|
===== Options
|
data/lib/doing/array/array.rb
CHANGED
data/lib/doing/colors.rb
CHANGED
|
@@ -296,19 +296,15 @@ module Doing
|
|
|
296
296
|
"\e[#{is_bg ? '48' : '38'};2;#{t.join(';')}m"
|
|
297
297
|
end
|
|
298
298
|
|
|
299
|
-
# Regular expression that is used to scan for ANSI-sequences while
|
|
300
|
-
# uncoloring strings.
|
|
301
|
-
COLORED_REGEXP = /\e\[(?:(?:[349]|10)[0-7]|[0-9])?m/.freeze
|
|
302
|
-
|
|
303
299
|
# Returns an uncolored version of the string, that is all
|
|
304
300
|
# ANSI-sequences are stripped from the string.
|
|
305
301
|
def uncolor(string = nil) # :yields:
|
|
306
302
|
if block_given?
|
|
307
|
-
yield.to_str.gsub(
|
|
303
|
+
yield.to_str.gsub(ESCAPE_REGEX, '')
|
|
308
304
|
elsif string.respond_to?(:to_str)
|
|
309
|
-
string.to_str.gsub(
|
|
305
|
+
string.to_str.gsub(ESCAPE_REGEX, '')
|
|
310
306
|
elsif respond_to?(:to_str)
|
|
311
|
-
to_str.gsub(
|
|
307
|
+
to_str.gsub(ESCAPE_REGEX, '')
|
|
312
308
|
else
|
|
313
309
|
''
|
|
314
310
|
end
|
data/lib/doing/item/query.rb
CHANGED
|
@@ -244,7 +244,7 @@ module Doing
|
|
|
244
244
|
|
|
245
245
|
if keep && opt[:before]
|
|
246
246
|
before = opt[:before]
|
|
247
|
-
cutoff = if before =~ time_rx
|
|
247
|
+
cutoff = if before.is_a?(String) && before =~ time_rx
|
|
248
248
|
"#{item.date.strftime('%Y-%m-%d')} #{before}".chronify(guess: :begin)
|
|
249
249
|
elsif before.is_a?(String)
|
|
250
250
|
before.chronify(guess: :begin)
|
|
@@ -257,7 +257,7 @@ module Doing
|
|
|
257
257
|
|
|
258
258
|
if keep && opt[:after]
|
|
259
259
|
after = opt[:after]
|
|
260
|
-
cutoff = if after =~ time_rx
|
|
260
|
+
cutoff = if after.is_a?(String) && after =~ time_rx
|
|
261
261
|
"#{item.date.strftime('%Y-%m-%d')} #{after}".chronify(guess: :end)
|
|
262
262
|
elsif after.is_a?(String)
|
|
263
263
|
after.chronify(guess: :end)
|
|
@@ -342,7 +342,7 @@ module Doing
|
|
|
342
342
|
tags.each do |tag|
|
|
343
343
|
return true if tag =~ /done/ && !should_finish?
|
|
344
344
|
|
|
345
|
-
return true if @title =~ /@#{tag.wildcard_to_rx}(?= |\(|\Z)/i
|
|
345
|
+
return true if @title =~ /@#{Regexp.escape(tag.wildcard_to_rx)}(?= |\(|\Z)/i
|
|
346
346
|
end
|
|
347
347
|
false
|
|
348
348
|
end
|
data/lib/doing/version.rb
CHANGED
data/lib/doing/wwid/display.rb
CHANGED
|
@@ -46,7 +46,9 @@ module Doing
|
|
|
46
46
|
if opt[:section].nil?
|
|
47
47
|
opt[:section] = choose_section
|
|
48
48
|
title = opt[:section]
|
|
49
|
-
elsif opt[:section].
|
|
49
|
+
elsif opt[:section].is_a?(Array)
|
|
50
|
+
title = opt[:section].join(', ')
|
|
51
|
+
elsif opt[:section].is_a?(String)
|
|
50
52
|
title = if opt[:section] =~ /^all$/i
|
|
51
53
|
if opt[:page_title]
|
|
52
54
|
opt[:page_title]
|
|
@@ -254,7 +256,8 @@ module Doing
|
|
|
254
256
|
## @param section [String] Section to pull from, default Currently
|
|
255
257
|
##
|
|
256
258
|
def last(times: true, section: nil, options: {})
|
|
257
|
-
section = section.
|
|
259
|
+
section = section[0] if section.is_a?(Array) && section.count == 1
|
|
260
|
+
section = section.nil? ? 'All' : guess_section(section)
|
|
258
261
|
cfg = Doing.setting(['templates', options[:config_template]]).deep_merge(Doing.setting('templates.default'), { extend_existing_arrays: true, sort_merged_arrays: true }).deep_merge({
|
|
259
262
|
'wrap_width' => Doing.setting('wrap_width', 0),
|
|
260
263
|
'date_format' => Doing.setting('default_date_format'),
|
data/lib/doing/wwid/filetools.rb
CHANGED
|
@@ -108,6 +108,7 @@ module Doing
|
|
|
108
108
|
tags = []
|
|
109
109
|
tags.concat(opt[:tag].split(/ *, */).map { |t| t.sub(/^@/, '').strip }) if opt[:tag]
|
|
110
110
|
bool = opt[:bool] || :and
|
|
111
|
+
|
|
111
112
|
sect = opt[:section] !~ /^all$/i ? guess_section(opt[:section]) : 'all'
|
|
112
113
|
|
|
113
114
|
section = guess_section(sect)
|
data/lib/doing/wwid/filter.rb
CHANGED
|
@@ -63,8 +63,15 @@ module Doing
|
|
|
63
63
|
time_rx = /^(\d{1,2}+(:\d{1,2}+)?( *(am|pm))?|midnight|noon)$/i
|
|
64
64
|
|
|
65
65
|
if items.nil? || items.empty?
|
|
66
|
-
section = opt[:section]
|
|
67
|
-
|
|
66
|
+
section = !opt[:section] || opt[:section].empty? ? 'All' : guess_section(opt[:section])
|
|
67
|
+
if section.is_a?(Array)
|
|
68
|
+
section.each do |s|
|
|
69
|
+
s = s[0] if s.is_a?(Array)
|
|
70
|
+
items.concat(s =~ /^all$/i ? @content.clone : @content.in_section(s))
|
|
71
|
+
end
|
|
72
|
+
else
|
|
73
|
+
items = section =~ /^all$/i ? @content.clone : @content.in_section(section)
|
|
74
|
+
end
|
|
68
75
|
end
|
|
69
76
|
|
|
70
77
|
unless opt[:time_filter]
|
data/lib/doing/wwid/guess.rb
CHANGED
|
@@ -9,7 +9,15 @@ module Doing
|
|
|
9
9
|
## @param guessed [Boolean] already guessed and failed
|
|
10
10
|
##
|
|
11
11
|
def guess_section(frag, guessed: false, suggest: false)
|
|
12
|
-
|
|
12
|
+
if frag.is_a?(Array) && frag.count == 1
|
|
13
|
+
frag = frag[0]
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
frag = frag.split(/ *, */).map(&:strip) if frag.is_a?(String) && frag =~ /,/
|
|
17
|
+
|
|
18
|
+
return frag.map { |s| guess_section(s, guessed: guessed, suggest: suggest) } if frag.is_a?(Array)
|
|
19
|
+
|
|
20
|
+
return 'All' if frag.empty? || frag.nil? || frag =~ /^all$/i
|
|
13
21
|
|
|
14
22
|
frag ||= Doing.setting('current_section')
|
|
15
23
|
|
|
@@ -19,7 +27,10 @@ module Doing
|
|
|
19
27
|
|
|
20
28
|
section = found ? found.title : nil
|
|
21
29
|
|
|
22
|
-
|
|
30
|
+
if suggest
|
|
31
|
+
Doing.logger.debug('Match:', %(Assuming "#{sect.title}" from "#{frag}"))
|
|
32
|
+
return section
|
|
33
|
+
end
|
|
23
34
|
|
|
24
35
|
unless section || guessed
|
|
25
36
|
alt = guess_view(frag, guessed: true, suggest: true)
|
|
@@ -33,8 +33,9 @@ module Doing
|
|
|
33
33
|
menu_options = %i[search query exact multiple show_if_single menu sort case].each_with_object({}) {
|
|
34
34
|
|k, hsh| hsh[k] = opt[k]
|
|
35
35
|
}
|
|
36
|
+
include_section = (opt[:section].is_a?(Array) && opt[:section][0] =~ /^all$/i) || (opt[:section].is_a?(String) && opt[:section] =~ /^all$/i)
|
|
36
37
|
|
|
37
|
-
selection = Prompt.choose_from_items(items, include_section:
|
|
38
|
+
selection = Prompt.choose_from_items(items, include_section: include_section, **menu_options)
|
|
38
39
|
|
|
39
40
|
raise NoResults, 'no items selected' if selection.nil? || selection.empty?
|
|
40
41
|
|
data/lib/doing/wwid/modify.rb
CHANGED
|
@@ -421,7 +421,8 @@ module Doing
|
|
|
421
421
|
tags = options[:tags] || []
|
|
422
422
|
bool = options[:bool] || :and
|
|
423
423
|
|
|
424
|
-
section =
|
|
424
|
+
section = section[0] if section.is_a?(Array) && section.count == 1
|
|
425
|
+
section = choose_section if section.nil? || section.empty? || section.is_a?(String) && section =~ /choose/i
|
|
425
426
|
archive_all = section =~ /^all$/i # && !(tags.nil? || tags.empty?)
|
|
426
427
|
section = guess_section(section) unless archive_all
|
|
427
428
|
|
data/lib/doing.rb
CHANGED
|
@@ -4,7 +4,6 @@ require 'doing/version'
|
|
|
4
4
|
require 'time'
|
|
5
5
|
require 'date'
|
|
6
6
|
require 'yaml'
|
|
7
|
-
require 'pp'
|
|
8
7
|
require 'csv'
|
|
9
8
|
require 'tempfile'
|
|
10
9
|
require 'zlib'
|
|
@@ -14,9 +13,9 @@ require 'readline'
|
|
|
14
13
|
require 'haml'
|
|
15
14
|
require 'json'
|
|
16
15
|
require 'logger'
|
|
17
|
-
require 'safe_yaml/load'
|
|
18
16
|
require 'fcntl'
|
|
19
17
|
require 'digest'
|
|
18
|
+
require 'safe_yaml/load'
|
|
20
19
|
|
|
21
20
|
require 'chronic'
|
|
22
21
|
require 'tty-link'
|
|
@@ -59,6 +58,7 @@ require_relative 'doing/chronify/chronify'
|
|
|
59
58
|
module Doing
|
|
60
59
|
class << self
|
|
61
60
|
attr_accessor :auto_tag
|
|
61
|
+
|
|
62
62
|
#
|
|
63
63
|
# Fetch the logger
|
|
64
64
|
#
|
|
@@ -8,7 +8,7 @@ command :autotag do |c|
|
|
|
8
8
|
# to tag command.
|
|
9
9
|
c.desc 'Section'
|
|
10
10
|
c.arg_name 'SECTION_NAME'
|
|
11
|
-
c.flag %i[s section], default_value: 'All'
|
|
11
|
+
c.flag %i[s section], default_value: 'All', multiple: true
|
|
12
12
|
|
|
13
13
|
c.desc 'How many recent entries to autotag (0 for all)'
|
|
14
14
|
c.arg_name 'COUNT'
|
|
@@ -2,7 +2,7 @@ desc 'Output a tag wiki'
|
|
|
2
2
|
command :wiki do |c|
|
|
3
3
|
c.desc 'Section to rotate'
|
|
4
4
|
c.arg_name 'SECTION_NAME'
|
|
5
|
-
c.flag %i[s section], default_value: 'All'
|
|
5
|
+
c.flag %i[s section], default_value: 'All', multiple: true
|
|
6
6
|
|
|
7
7
|
c.desc 'Tag filter, combine multiple tags with a comma, use with --bool'
|
|
8
8
|
c.arg_name 'TAG'
|
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.
|
|
4
|
+
version: 2.1.81
|
|
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-
|
|
11
|
+
date: 2023-05-31 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: github-markup
|
|
@@ -865,7 +865,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
865
865
|
- !ruby/object:Gem::Version
|
|
866
866
|
version: '0'
|
|
867
867
|
requirements: []
|
|
868
|
-
rubygems_version: 3.
|
|
868
|
+
rubygems_version: 3.4.0.dev
|
|
869
869
|
signing_key:
|
|
870
870
|
specification_version: 4
|
|
871
871
|
summary: A command line tool for managing What Was I Doing reminders
|