doing 2.1.89 → 2.1.90
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/.irbrc +2 -0
- data/.rubocop.yml +1 -0
- data/.rubocop_todo.yml +251 -0
- data/CHANGELOG.md +22 -0
- data/Gemfile +2 -0
- data/Gemfile.lock +1 -1
- data/Rakefile +5 -3
- data/bin/commands/changes.rb +3 -1
- data/bin/commands/choose.rb +2 -0
- data/bin/commands/colors.rb +5 -3
- data/bin/commands/commands_accepting.rb +3 -3
- data/bin/commands/completion.rb +2 -1
- data/bin/commands/config.rb +8 -6
- data/bin/commands/done.rb +19 -12
- data/bin/commands/finish.rb +4 -2
- data/bin/commands/grep.rb +9 -5
- data/bin/commands/import.rb +14 -11
- data/bin/commands/install_fzf.rb +4 -2
- data/bin/commands/last.rb +31 -27
- data/bin/commands/meanwhile.rb +6 -2
- data/bin/commands/note.rb +6 -3
- data/bin/commands/now.rb +2 -0
- data/bin/commands/open.rb +6 -1
- data/bin/commands/plugins.rb +2 -0
- data/bin/commands/recent.rb +47 -33
- data/bin/commands/reset.rb +7 -3
- data/bin/commands/rotate.rb +6 -3
- data/bin/commands/sections.rb +3 -3
- data/bin/commands/select.rb +2 -0
- data/bin/commands/show.rb +24 -20
- data/bin/commands/since.rb +10 -3
- data/bin/commands/tag.rb +18 -16
- data/bin/commands/tag_dir.rb +5 -2
- data/bin/commands/tags.rb +17 -17
- data/bin/commands/template.rb +8 -2
- data/bin/commands/today.rb +10 -2
- data/bin/commands/undo.rb +2 -0
- data/bin/commands/update.rb +9 -7
- data/bin/commands/view.rb +11 -8
- data/bin/commands/views.rb +2 -0
- data/bin/commands/yesterday.rb +6 -1
- data/bin/doing +54 -57
- data/docs/doc/Array.html +3 -3
- 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 +9 -9
- data/docs/doc/Doing/ByDayExport.html +3 -3
- data/docs/doc/Doing/CSVExport.html +4 -4
- data/docs/doc/Doing/CalendarImport.html +4 -4
- 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 +6 -6
- data/docs/doc/Doing/Color.html +88 -47
- 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 +5 -5
- data/docs/doc/Doing/Configuration.html +6 -6
- data/docs/doc/Doing/DayOneRenderer.html +3 -3
- data/docs/doc/Doing/DayoneExport.html +4 -4
- data/docs/doc/Doing/DoingExport.html +5 -5
- data/docs/doc/Doing/DoingImport.html +4 -4
- 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 +4 -4
- data/docs/doc/Doing/Hooks.html +3 -16
- 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 +3 -3
- data/docs/doc/Doing/JSONExport.html +4 -4
- data/docs/doc/Doing/JSONImport.html +4 -4
- data/docs/doc/Doing/Logger.html +183 -3
- data/docs/doc/Doing/MarkdownExport.html +4 -4
- data/docs/doc/Doing/Note.html +3 -3
- data/docs/doc/Doing/Pager.html +54 -58
- 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 +4 -4
- 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 +5 -5
- data/docs/doc/Doing/TaskPaperExport.html +4 -4
- data/docs/doc/Doing/TemplateExport.html +5 -5
- data/docs/doc/Doing/TemplateString.html +7 -7
- data/docs/doc/Doing/TimingImport.html +4 -4
- data/docs/doc/Doing/Types.html +3 -3
- data/docs/doc/Doing/Util/Backup.html +4 -17
- data/docs/doc/Doing/Util.html +56 -61
- data/docs/doc/Doing/Version.html +3 -3
- data/docs/doc/Doing/WWID.html +6 -4
- data/docs/doc/Doing.html +4 -4
- data/docs/doc/FalseClass.html +3 -3
- data/docs/doc/GLI/Commands/Help.html +5 -5
- 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 +4 -4
- 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 +51 -5
- 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/class_list.html +6 -3
- data/docs/doc/css/full_list.css +3 -3
- data/docs/doc/css/style.css +6 -0
- data/docs/doc/file.README.html +3 -3
- data/docs/doc/file_list.html +5 -2
- data/docs/doc/frames.html +1 -1
- data/docs/doc/index.html +3 -3
- data/docs/doc/js/app.js +294 -264
- data/docs/doc/js/full_list.js +30 -4
- data/docs/doc/method_list.html +443 -392
- data/docs/doc/top-level-namespace.html +3 -3
- data/doing.gemspec +2 -0
- data/doing.rdoc +1 -1
- data/example_plugin.rb +1 -4
- data/lib/doing/add_options.rb +2 -2
- data/lib/doing/array/cleanup.rb +2 -0
- data/lib/doing/array/nested_hash.rb +2 -0
- data/lib/doing/boolean_term_parser.rb +3 -3
- data/lib/doing/changelog/changes.rb +4 -5
- data/lib/doing/changelog/version.rb +8 -11
- data/lib/doing/chronify/array.rb +4 -4
- data/lib/doing/chronify/string.rb +5 -4
- data/lib/doing/cli_status.rb +7 -2
- data/lib/doing/colors.rb +93 -51
- data/lib/doing/completion/bash_completion.rb +36 -39
- data/lib/doing/completion/completion_string.rb +2 -1
- data/lib/doing/completion/fig_completion.rb +33 -33
- data/lib/doing/completion/fish_completion.rb +22 -23
- data/lib/doing/completion/zsh_completion.rb +5 -5
- data/lib/doing/completion.rb +7 -4
- data/lib/doing/configuration.rb +21 -13
- data/lib/doing/errors.rb +1 -4
- data/lib/doing/good.rb +1 -1
- data/lib/doing/hash.rb +4 -4
- data/lib/doing/help_monkey_patch.rb +1 -1
- data/lib/doing/hooks.rb +6 -2
- data/lib/doing/item/dates.rb +3 -1
- data/lib/doing/item/query.rb +10 -10
- data/lib/doing/item/state.rb +2 -0
- data/lib/doing/logger.rb +113 -45
- data/lib/doing/markdown_document_listener.rb +25 -25
- data/lib/doing/normalize.rb +1 -1
- data/lib/doing/pager.rb +73 -29
- data/lib/doing/plugin_manager.rb +4 -5
- data/lib/doing/plugins/export/byday.rb +1 -1
- data/lib/doing/plugins/export/dayone_export.rb +28 -27
- data/lib/doing/plugins/export/doing_export.rb +1 -1
- data/lib/doing/plugins/export/html_export.rb +3 -3
- data/lib/doing/plugins/export/json_export.rb +4 -5
- data/lib/doing/plugins/export/markdown_export.rb +10 -2
- data/lib/doing/plugins/export/taskpaper_export.rb +1 -0
- data/lib/doing/plugins/export/template_export.rb +110 -107
- data/lib/doing/plugins/import/calendar_import.rb +1 -1
- data/lib/doing/plugins/import/doing_import.rb +2 -2
- data/lib/doing/plugins/import/timing_import.rb +3 -3
- data/lib/doing/prompt/choose.rb +5 -6
- data/lib/doing/prompt/fzf.rb +3 -2
- data/lib/doing/prompt/input.rb +7 -6
- data/lib/doing/prompt/yn.rb +9 -11
- data/lib/doing/string/tags.rb +7 -4
- data/lib/doing/string/transform.rb +15 -10
- data/lib/doing/string/truncate.rb +1 -0
- data/lib/doing/string/url.rb +1 -1
- data/lib/doing/template_string.rb +13 -9
- data/lib/doing/time.rb +4 -2
- data/lib/doing/util.rb +12 -11
- data/lib/doing/util_backup.rb +29 -26
- data/lib/doing/version.rb +3 -1
- data/lib/doing/wwid/display.rb +182 -151
- data/lib/doing/wwid/editor.rb +13 -12
- data/lib/doing/wwid/filetools.rb +13 -11
- data/lib/doing/wwid/filter.rb +41 -40
- data/lib/doing/wwid/guess.rb +6 -8
- data/lib/doing/wwid/interactive.rb +9 -9
- data/lib/doing/wwid/modify.rb +53 -53
- data/lib/doing/wwid/timers.rb +4 -5
- data/lib/doing/wwid/wwid.rb +0 -0
- data/lib/doing/wwid/wwidutil.rb +8 -10
- data/lib/examples/commands/wiki.rb +2 -0
- data/lib/examples/plugins/capture_thing_import.rb +1 -1
- data/lib/examples/plugins/say_export.rb +1 -2
- data/lib/examples/plugins/wiki_export/wiki_export.rb +3 -4
- data/lib/helpers/fzf/test/test_go.rb +5 -5
- data/lib/helpers/threaded_tests.rb +20 -20
- data/lib/helpers/threaded_tests_string.rb +2 -0
- data/rdoc_to_mmd.rb +5 -4
- data/rdocfixer.rb +1 -2
- data/scripts/deploy.rb +3 -4
- data/scripts/generate_bash_completions.rb +40 -43
- data/scripts/generate_fish_completions.rb +17 -15
- data/scripts/generate_zsh_completions.rb +9 -7
- data/scripts/setting_replace.rb +1 -0
- data/scripts/sort_commands.rb +4 -2
- data/yard_templates/default/method_details/setup.rb +3 -1
- metadata +3 -1
data/bin/commands/today.rb
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
# @@today
|
|
2
4
|
desc 'List entries from today'
|
|
3
5
|
long_desc 'List entries from the current day. Use --before, --after, and
|
|
@@ -18,11 +20,17 @@ command :today do |c|
|
|
|
18
20
|
add_options(:save, c)
|
|
19
21
|
|
|
20
22
|
c.action do |_global_options, options, _args|
|
|
21
|
-
|
|
23
|
+
if options[:output] && options[:output] !~ Doing::Plugins.plugin_regex(type: :export)
|
|
24
|
+
raise InvalidPlugin.new('output',
|
|
25
|
+
options[:output])
|
|
26
|
+
end
|
|
22
27
|
|
|
23
28
|
options[:times] = true if options[:totals]
|
|
24
29
|
options[:sort_tags] = options[:tag_sort]
|
|
25
|
-
filter_options = %i[after before times duration from section sort_tags totals tag_order template config_template
|
|
30
|
+
filter_options = %i[after before times duration from section sort_tags totals tag_order template config_template
|
|
31
|
+
only_timed].each_with_object({}) do |k, hsh|
|
|
32
|
+
hsh[k] = options[k]
|
|
33
|
+
end
|
|
26
34
|
filter_options[:today] = true
|
|
27
35
|
Doing::Pager.page @wwid.today(options[:times], options[:output], filter_options).chomp
|
|
28
36
|
filter_options[:title] = options[:title]
|
data/bin/commands/undo.rb
CHANGED
data/bin/commands/update.rb
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
# @@update
|
|
2
4
|
|
|
3
5
|
desc 'Update doing to the latest version'
|
|
@@ -8,13 +10,13 @@ command %i[update] do |c|
|
|
|
8
10
|
c.desc 'Check for pre-release version'
|
|
9
11
|
c.switch %i[p pre beta], negatable: false, default_value: false
|
|
10
12
|
|
|
11
|
-
c.action do |
|
|
13
|
+
c.action do |_global_options, options, _args|
|
|
12
14
|
my_version = `doing -v`.match(/doing version (?<v>[\d.]+)(?:\.?pre[,)])?/)['v']
|
|
13
|
-
if options[:beta]
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
latest_version = if options[:beta]
|
|
16
|
+
`gem search doing --pre`.match(/^doing \((?<v>[\d.]+)\.?pre[,)]/)['v']
|
|
17
|
+
else
|
|
18
|
+
`gem search doing`.match(/^doing \((?<v>[\d.]+)\)/)['v']
|
|
19
|
+
end
|
|
18
20
|
my_version = Doing::Version.new(my_version)
|
|
19
21
|
latest_version = Doing::Version.new(latest_version)
|
|
20
22
|
|
|
@@ -23,7 +25,7 @@ command %i[update] do |c|
|
|
|
23
25
|
if outdated
|
|
24
26
|
pre = options[:beta] ? '--pre' : ''
|
|
25
27
|
res = `gem install doing #{pre} 2> /dev/null`
|
|
26
|
-
res
|
|
28
|
+
res ||= `sudo gem install doing #{pre}`
|
|
27
29
|
ver = res.match(/doing-(?<v>[\d.]+)\n/)['v']
|
|
28
30
|
if ver
|
|
29
31
|
Doing.logger.info("Version #{ver} installed")
|
data/bin/commands/view.rb
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
# @@view
|
|
2
4
|
desc 'Display a user-created view'
|
|
3
5
|
long_desc 'Views are defined in your configuration (use `doing config` to edit).
|
|
@@ -5,7 +7,8 @@ Command line options override view configuration.'
|
|
|
5
7
|
arg_name 'VIEW_NAME'
|
|
6
8
|
command :view do |c|
|
|
7
9
|
c.example 'doing view color', desc: 'Display entries according to config for view "color"'
|
|
8
|
-
c.example 'doing view color --section Archive --count 10',
|
|
10
|
+
c.example 'doing view color --section Archive --count 10',
|
|
11
|
+
desc: 'Display view "color", overriding some configured settings'
|
|
9
12
|
|
|
10
13
|
c.desc 'Section'
|
|
11
14
|
c.arg_name 'NAME'
|
|
@@ -31,7 +34,7 @@ command :view do |c|
|
|
|
31
34
|
c.desc 'Include colors in output'
|
|
32
35
|
c.switch [:color], negatable: true
|
|
33
36
|
|
|
34
|
-
c.desc
|
|
37
|
+
c.desc 'Highlight search matches in output. Only affects command line output'
|
|
35
38
|
c.switch %i[h hilite], default_value: Doing.settings.dig('search', 'highlight'), negatable: true
|
|
36
39
|
|
|
37
40
|
c.desc 'Sort tags by (name|time)'
|
|
@@ -76,11 +79,11 @@ command :view do |c|
|
|
|
76
79
|
end
|
|
77
80
|
end
|
|
78
81
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
82
|
+
if options[:section]
|
|
83
|
+
@wwid.guess_section(options[:section]) || options[:section].cap_first
|
|
84
|
+
else
|
|
85
|
+
Doing.setting('current_section')
|
|
86
|
+
end
|
|
84
87
|
|
|
85
88
|
view = @wwid.view_to_options(title)
|
|
86
89
|
|
|
@@ -95,7 +98,7 @@ command :view do |c|
|
|
|
95
98
|
|
|
96
99
|
page_title = options[:title] || title.cap_first
|
|
97
100
|
tag_filter = false
|
|
98
|
-
if options[:tag]
|
|
101
|
+
if options[:tag]&.good
|
|
99
102
|
tag_filter = { 'tags' => [], 'bool' => 'OR' }
|
|
100
103
|
bool = options[:bool].normalize_bool
|
|
101
104
|
tag_filter['bool'] = bool
|
data/bin/commands/views.rb
CHANGED
data/bin/commands/yesterday.rb
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
# @@yesterday
|
|
2
4
|
desc 'List entries from yesterday'
|
|
3
5
|
long_desc 'Show only entries with start times within the previous 24 hour period. Use --before, --after, and --from to limit to
|
|
@@ -17,7 +19,10 @@ command :yesterday do |c|
|
|
|
17
19
|
add_options(:save, c)
|
|
18
20
|
|
|
19
21
|
c.action do |_global_options, options, _args|
|
|
20
|
-
|
|
22
|
+
if options[:output] && options[:output] !~ Doing::Plugins.plugin_regex(type: :export)
|
|
23
|
+
raise InvalidPlugin.new('output',
|
|
24
|
+
options[:output])
|
|
25
|
+
end
|
|
21
26
|
|
|
22
27
|
options[:sort_tags] = options[:tag_sort]
|
|
23
28
|
|
data/bin/doing
CHANGED
|
@@ -55,9 +55,9 @@ end
|
|
|
55
55
|
|
|
56
56
|
Doing.logger.benchmark(:total, :start)
|
|
57
57
|
|
|
58
|
-
Doing.logger.
|
|
59
|
-
Doing.config_with(ENV['DOING_CONFIG'], { ignore_local: true }) if ENV['DOING_CONFIG']
|
|
60
|
-
|
|
58
|
+
Doing.logger.measure(:configure) do
|
|
59
|
+
Doing.config_with(ENV['DOING_CONFIG'], { ignore_local: true }) if ENV['DOING_CONFIG']
|
|
60
|
+
end
|
|
61
61
|
|
|
62
62
|
Doing.set('backup_dir', ENV['DOING_BACKUP_DIR']) if ENV['DOING_BACKUP_DIR']
|
|
63
63
|
|
|
@@ -89,10 +89,7 @@ accept TagSortSymbol do |value|
|
|
|
89
89
|
end
|
|
90
90
|
|
|
91
91
|
accept ExportTemplate do |value|
|
|
92
|
-
if value !~ Doing::Plugins.plugin_regex(type: :export)
|
|
93
|
-
raise Doing::Errors::InvalidPlugin.new('output', value)
|
|
94
|
-
|
|
95
|
-
end
|
|
92
|
+
raise Doing::Errors::InvalidPlugin.new('output', value) if value !~ Doing::Plugins.plugin_regex(type: :export)
|
|
96
93
|
|
|
97
94
|
tpl = nil
|
|
98
95
|
|
|
@@ -258,11 +255,10 @@ end
|
|
|
258
255
|
on_error do |exception|
|
|
259
256
|
case exception
|
|
260
257
|
when GLI::UnknownCommand
|
|
258
|
+
exit run(['view'].concat(ARGV.unshift(@command))) if @wwid.get_view(@command, fallback: false)
|
|
261
259
|
if ARGV.count > 1
|
|
262
|
-
exit run(['view'].concat(ARGV.unshift(@command))) if @wwid.get_view(@command, fallback: false)
|
|
263
260
|
exit run(['now'].concat(ARGV.unshift(@command)))
|
|
264
261
|
else
|
|
265
|
-
exit run(['view'].concat(ARGV.unshift(@command))) if @wwid.get_view(@command, fallback: false)
|
|
266
262
|
|
|
267
263
|
Doing::Color.coloring = $stdout.isatty
|
|
268
264
|
Doing.logger.error('Unknown Command:', @command)
|
|
@@ -287,62 +283,63 @@ post do |_global, _command, _options, _args|
|
|
|
287
283
|
end
|
|
288
284
|
|
|
289
285
|
around do |global, command, _options, _arguments, code|
|
|
290
|
-
Doing.logger.
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
286
|
+
Doing.logger.measure("command_#{command.name}".to_sym) do
|
|
287
|
+
# pager_msg = "Global: #{global[:pager]}, Config: #{Doing.setting('paginate')}, Pager: #{Doing::Pager.paginate}"
|
|
288
|
+
# Doing.logger.debug('Pager:', pager_msg)
|
|
289
|
+
Doing.logger.adjust_verbosity(global) if env_log_level.nil?
|
|
290
|
+
|
|
291
|
+
global[:stdin] = $stdin.read.strip if $stdin.stat.size.positive? || $stdin.fcntl(Fcntl::F_GETFL, 0).zero?
|
|
292
|
+
global[:stdin] = nil unless global[:stdin].good?
|
|
293
|
+
|
|
294
|
+
Doing.logger.logdev = $stdout if global[:stdout]
|
|
295
|
+
|
|
296
|
+
if global[:yes]
|
|
297
|
+
Doing::Prompt.force_answer = :yes
|
|
298
|
+
Doing.config.force_answer = true
|
|
299
|
+
elsif global[:no]
|
|
300
|
+
Doing::Prompt.force_answer = :no
|
|
301
|
+
Doing.config.force_answer = false
|
|
302
|
+
else
|
|
303
|
+
Doing::Prompt.default_answer = if $stdout.isatty
|
|
304
|
+
global[:default]
|
|
305
|
+
else
|
|
306
|
+
true
|
|
307
|
+
end
|
|
312
308
|
|
|
313
|
-
|
|
314
|
-
|
|
309
|
+
Doing.config.force_answer = global[:default] ? true : false
|
|
310
|
+
end
|
|
315
311
|
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
312
|
+
if global[:config_file] && global[:config_file] != Doing.config.config_file
|
|
313
|
+
msg = Doing::Color.template(['{Rwb}WARNING:{x} {br}The use of --config_file is deprecated,',
|
|
314
|
+
'please set the environment variable DOING_CONFIG instead.{x}'])
|
|
315
|
+
Doing.logger.warn(msg)
|
|
316
|
+
msg = Doing::Color.template(['{r}To set it just for the current command, use:',
|
|
317
|
+
'{bw}DOING_CONFIG=/path/to/doingrc doing [command]{x}'])
|
|
318
|
+
Doing.logger.warn(msg)
|
|
323
319
|
|
|
324
|
-
|
|
325
|
-
|
|
320
|
+
cf = File.expand_path(global[:config_file])
|
|
321
|
+
raise MissingConfigFile, "Config file not found (#{global[:config_file]})" unless File.exist?(cf)
|
|
326
322
|
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
Doing.logger.benchmark(:init, :start)
|
|
331
|
-
if global[:doing_file]
|
|
332
|
-
@wwid.init_doing_file(global[:doing_file])
|
|
333
|
-
else
|
|
334
|
-
@wwid.init_doing_file
|
|
335
|
-
end
|
|
336
|
-
Doing.logger.benchmark(:init, :finish)
|
|
337
|
-
Doing.auto_tag = !global[:noauto]
|
|
323
|
+
Doing.config.config_file = cf
|
|
324
|
+
Doing.config_with(cf, { ignore_local: true })
|
|
325
|
+
end
|
|
338
326
|
|
|
339
|
-
|
|
327
|
+
Doing.logger.measure(:init) do
|
|
328
|
+
if global[:doing_file]
|
|
329
|
+
@wwid.init_doing_file(global[:doing_file])
|
|
330
|
+
else
|
|
331
|
+
@wwid.init_doing_file
|
|
332
|
+
end
|
|
333
|
+
end
|
|
334
|
+
|
|
335
|
+
Doing.auto_tag = !global[:noauto]
|
|
340
336
|
|
|
341
|
-
|
|
337
|
+
Doing.set('include_notes', false) unless global[:notes]
|
|
342
338
|
|
|
343
|
-
|
|
339
|
+
global[:wwid] = @wwid
|
|
344
340
|
|
|
345
|
-
|
|
341
|
+
code.call
|
|
342
|
+
end
|
|
346
343
|
end
|
|
347
344
|
|
|
348
345
|
commands_from File.expand_path(Doing.setting('plugins.command_path')) if Doing.setting('plugins.command_path')
|
data/docs/doc/Array.html
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<title>
|
|
7
7
|
Class: Array
|
|
8
8
|
|
|
9
|
-
— Documentation by YARD 0.9.
|
|
9
|
+
— Documentation by YARD 0.9.37
|
|
10
10
|
|
|
11
11
|
</title>
|
|
12
12
|
|
|
@@ -350,9 +350,9 @@ has content</p>
|
|
|
350
350
|
</div>
|
|
351
351
|
|
|
352
352
|
<div id="footer">
|
|
353
|
-
Generated on
|
|
353
|
+
Generated on Thu Oct 23 08:05:57 2025 by
|
|
354
354
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
355
|
-
0.9.
|
|
355
|
+
0.9.37 (ruby-3.4.4).
|
|
356
356
|
</div>
|
|
357
357
|
|
|
358
358
|
</div>
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<title>
|
|
7
7
|
Class: BooleanTermParser::Clause
|
|
8
8
|
|
|
9
|
-
— Documentation by YARD 0.9.
|
|
9
|
+
— Documentation by YARD 0.9.37
|
|
10
10
|
|
|
11
11
|
</title>
|
|
12
12
|
|
|
@@ -283,9 +283,9 @@
|
|
|
283
283
|
</div>
|
|
284
284
|
|
|
285
285
|
<div id="footer">
|
|
286
|
-
Generated on
|
|
286
|
+
Generated on Thu Oct 23 08:05:57 2025 by
|
|
287
287
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
288
|
-
0.9.
|
|
288
|
+
0.9.37 (ruby-3.4.4).
|
|
289
289
|
</div>
|
|
290
290
|
|
|
291
291
|
</div>
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<title>
|
|
7
7
|
Class: BooleanTermParser::Operator
|
|
8
8
|
|
|
9
|
-
— Documentation by YARD 0.9.
|
|
9
|
+
— Documentation by YARD 0.9.37
|
|
10
10
|
|
|
11
11
|
</title>
|
|
12
12
|
|
|
@@ -162,9 +162,9 @@
|
|
|
162
162
|
</div>
|
|
163
163
|
|
|
164
164
|
<div id="footer">
|
|
165
|
-
Generated on
|
|
165
|
+
Generated on Thu Oct 23 08:05:57 2025 by
|
|
166
166
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
167
|
-
0.9.
|
|
167
|
+
0.9.37 (ruby-3.4.4).
|
|
168
168
|
</div>
|
|
169
169
|
|
|
170
170
|
</div>
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<title>
|
|
7
7
|
Class: BooleanTermParser::Query
|
|
8
8
|
|
|
9
|
-
— Documentation by YARD 0.9.
|
|
9
|
+
— Documentation by YARD 0.9.37
|
|
10
10
|
|
|
11
11
|
</title>
|
|
12
12
|
|
|
@@ -407,9 +407,9 @@
|
|
|
407
407
|
</div>
|
|
408
408
|
|
|
409
409
|
<div id="footer">
|
|
410
|
-
Generated on
|
|
410
|
+
Generated on Thu Oct 23 08:05:57 2025 by
|
|
411
411
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
412
|
-
0.9.
|
|
412
|
+
0.9.37 (ruby-3.4.4).
|
|
413
413
|
</div>
|
|
414
414
|
|
|
415
415
|
</div>
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<title>
|
|
7
7
|
Class: BooleanTermParser::QueryParser
|
|
8
8
|
|
|
9
|
-
— Documentation by YARD 0.9.
|
|
9
|
+
— Documentation by YARD 0.9.37
|
|
10
10
|
|
|
11
11
|
</title>
|
|
12
12
|
|
|
@@ -125,9 +125,9 @@ parser. In order to do that, a new "clause" node is added to the parse
|
|
|
125
125
|
</div>
|
|
126
126
|
|
|
127
127
|
<div id="footer">
|
|
128
|
-
Generated on
|
|
128
|
+
Generated on Thu Oct 23 08:05:57 2025 by
|
|
129
129
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
130
|
-
0.9.
|
|
130
|
+
0.9.37 (ruby-3.4.4).
|
|
131
131
|
</div>
|
|
132
132
|
|
|
133
133
|
</div>
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<title>
|
|
7
7
|
Class: BooleanTermParser::QueryTransformer
|
|
8
8
|
|
|
9
|
-
— Documentation by YARD 0.9.
|
|
9
|
+
— Documentation by YARD 0.9.37
|
|
10
10
|
|
|
11
11
|
</title>
|
|
12
12
|
|
|
@@ -114,9 +114,9 @@
|
|
|
114
114
|
</div>
|
|
115
115
|
|
|
116
116
|
<div id="footer">
|
|
117
|
-
Generated on
|
|
117
|
+
Generated on Thu Oct 23 08:05:57 2025 by
|
|
118
118
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
119
|
-
0.9.
|
|
119
|
+
0.9.37 (ruby-3.4.4).
|
|
120
120
|
</div>
|
|
121
121
|
|
|
122
122
|
</div>
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<title>
|
|
7
7
|
Module: BooleanTermParser
|
|
8
8
|
|
|
9
|
-
— Documentation by YARD 0.9.
|
|
9
|
+
— Documentation by YARD 0.9.37
|
|
10
10
|
|
|
11
11
|
</title>
|
|
12
12
|
|
|
@@ -105,9 +105,9 @@
|
|
|
105
105
|
</div>
|
|
106
106
|
|
|
107
107
|
<div id="footer">
|
|
108
|
-
Generated on
|
|
108
|
+
Generated on Thu Oct 23 08:05:57 2025 by
|
|
109
109
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
110
|
-
0.9.
|
|
110
|
+
0.9.37 (ruby-3.4.4).
|
|
111
111
|
</div>
|
|
112
112
|
|
|
113
113
|
</div>
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<title>
|
|
7
7
|
Module: Doing::ArrayCleanup
|
|
8
8
|
|
|
9
|
-
— Documentation by YARD 0.9.
|
|
9
|
+
— Documentation by YARD 0.9.37
|
|
10
10
|
|
|
11
11
|
</title>
|
|
12
12
|
|
|
@@ -306,9 +306,9 @@ removes empty elements</p>
|
|
|
306
306
|
</div>
|
|
307
307
|
|
|
308
308
|
<div id="footer">
|
|
309
|
-
Generated on
|
|
309
|
+
Generated on Thu Oct 23 08:05:57 2025 by
|
|
310
310
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
311
|
-
0.9.
|
|
311
|
+
0.9.37 (ruby-3.4.4).
|
|
312
312
|
</div>
|
|
313
313
|
|
|
314
314
|
</div>
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<title>
|
|
7
7
|
Module: Doing::ArrayNestedHash
|
|
8
8
|
|
|
9
|
-
— Documentation by YARD 0.9.
|
|
9
|
+
— Documentation by YARD 0.9.37
|
|
10
10
|
|
|
11
11
|
</title>
|
|
12
12
|
|
|
@@ -188,9 +188,9 @@
|
|
|
188
188
|
</div>
|
|
189
189
|
|
|
190
190
|
<div id="footer">
|
|
191
|
-
Generated on
|
|
191
|
+
Generated on Thu Oct 23 08:05:57 2025 by
|
|
192
192
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
193
|
-
0.9.
|
|
193
|
+
0.9.37 (ruby-3.4.4).
|
|
194
194
|
</div>
|
|
195
195
|
|
|
196
196
|
</div>
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<title>
|
|
7
7
|
Module: Doing::ArrayTags
|
|
8
8
|
|
|
9
|
-
— Documentation by YARD 0.9.
|
|
9
|
+
— Documentation by YARD 0.9.37
|
|
10
10
|
|
|
11
11
|
</title>
|
|
12
12
|
|
|
@@ -328,11 +328,11 @@ with</p>
|
|
|
328
328
|
<div class="tags">
|
|
329
329
|
|
|
330
330
|
<div class="examples">
|
|
331
|
-
<
|
|
331
|
+
<h4 class="tag_title">Examples:</h4>
|
|
332
332
|
|
|
333
333
|
|
|
334
|
-
<
|
|
335
|
-
</div></
|
|
334
|
+
<h5 class="example_title"><div class='inline'><p>Convert an array of tags to strings</p>
|
|
335
|
+
</div></h5>
|
|
336
336
|
|
|
337
337
|
<pre class="example code"><code><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>@one</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>@two</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>three</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_to_tags'>to_tags</span> <span class='op'>=></span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>one</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>two</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>three</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span></code></pre>
|
|
338
338
|
|
|
@@ -378,11 +378,11 @@ with</p>
|
|
|
378
378
|
<div class="tags">
|
|
379
379
|
|
|
380
380
|
<div class="examples">
|
|
381
|
-
<
|
|
381
|
+
<h4 class="tag_title">Examples:</h4>
|
|
382
382
|
|
|
383
383
|
|
|
384
|
-
<
|
|
385
|
-
</div></
|
|
384
|
+
<h5 class="example_title"><div class='inline'><p>Convert an array of strings with or without @ symbols</p>
|
|
385
|
+
</div></h5>
|
|
386
386
|
|
|
387
387
|
<pre class="example code"><code><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>one</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>@two</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>three</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_to_tags'>to_tags</span> <span class='op'>=></span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>@one</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>@two</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>@three</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span></code></pre>
|
|
388
388
|
|
|
@@ -414,9 +414,9 @@ with</p>
|
|
|
414
414
|
</div>
|
|
415
415
|
|
|
416
416
|
<div id="footer">
|
|
417
|
-
Generated on
|
|
417
|
+
Generated on Thu Oct 23 08:05:56 2025 by
|
|
418
418
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
419
|
-
0.9.
|
|
419
|
+
0.9.37 (ruby-3.4.4).
|
|
420
420
|
</div>
|
|
421
421
|
|
|
422
422
|
</div>
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<title>
|
|
7
7
|
Class: Doing::ByDayExport
|
|
8
8
|
|
|
9
|
-
— Documentation by YARD 0.9.
|
|
9
|
+
— Documentation by YARD 0.9.37
|
|
10
10
|
|
|
11
11
|
</title>
|
|
12
12
|
|
|
@@ -196,9 +196,9 @@
|
|
|
196
196
|
</div>
|
|
197
197
|
|
|
198
198
|
<div id="footer">
|
|
199
|
-
Generated on
|
|
199
|
+
Generated on Thu Oct 23 08:05:57 2025 by
|
|
200
200
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
201
|
-
0.9.
|
|
201
|
+
0.9.37 (ruby-3.4.4).
|
|
202
202
|
</div>
|
|
203
203
|
|
|
204
204
|
</div>
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<title>
|
|
7
7
|
Class: Doing::CSVExport
|
|
8
8
|
|
|
9
|
-
— Documentation by YARD 0.9.
|
|
9
|
+
— Documentation by YARD 0.9.37
|
|
10
10
|
|
|
11
11
|
</title>
|
|
12
12
|
|
|
@@ -208,7 +208,7 @@
|
|
|
208
208
|
|
|
209
209
|
|
|
210
210
|
<h3 class="inherited">Methods included from <span class='object_link'><a href="Util.html" title="Doing::Util (module)">Util</a></span></h3>
|
|
211
|
-
<p class="inherited"><span class='object_link'><a href="Util.html#args_for_editor-
|
|
211
|
+
<p class="inherited"><span class='object_link'><a href="Util.html#args_for_editor-class_method" title="Doing::Util.args_for_editor (method)">args_for_editor</a></span>, <span class='object_link'><a href="Util.html#deep_merge_hashes-class_method" title="Doing::Util.deep_merge_hashes (method)">deep_merge_hashes</a></span>, <span class='object_link'><a href="Util.html#deep_merge_hashes!-class_method" title="Doing::Util.deep_merge_hashes! (method)">deep_merge_hashes!</a></span>, <span class='object_link'><a href="Util.html#default_editor-class_method" title="Doing::Util.default_editor (method)">default_editor</a></span>, <span class='object_link'><a href="Util.html#duplicable%3F-class_method" title="Doing::Util.duplicable? (method)">duplicable?</a></span>, <span class='object_link'><a href="Util.html#duplicate_frozen_values-class_method" title="Doing::Util.duplicate_frozen_values (method)">duplicate_frozen_values</a></span>, <span class='object_link'><a href="Util.html#editor_with_args-class_method" title="Doing::Util.editor_with_args (method)">editor_with_args</a></span>, <span class='object_link'><a href="Util.html#exec_available-class_method" title="Doing::Util.exec_available (method)">exec_available</a></span>, <span class='object_link'><a href="Util.html#find_default_editor-class_method" title="Doing::Util.find_default_editor (method)">find_default_editor</a></span>, <span class='object_link'><a href="Util.html#first_available_exec-class_method" title="Doing::Util.first_available_exec (method)">first_available_exec</a></span>, <span class='object_link'><a href="Util.html#mergable%3F-class_method" title="Doing::Util.mergable? (method)">mergable?</a></span>, <span class='object_link'><a href="Util.html#merge_default_proc-class_method" title="Doing::Util.merge_default_proc (method)">merge_default_proc</a></span>, <span class='object_link'><a href="Util.html#merge_values-class_method" title="Doing::Util.merge_values (method)">merge_values</a></span>, <span class='object_link'><a href="Util.html#safe_load_file-class_method" title="Doing::Util.safe_load_file (method)">safe_load_file</a></span>, <span class='object_link'><a href="Util.html#user_home-class_method" title="Doing::Util.user_home (method)">user_home</a></span>, <span class='object_link'><a href="Util.html#write_to_file-class_method" title="Doing::Util.write_to_file (method)">write_to_file</a></span></p>
|
|
212
212
|
|
|
213
213
|
|
|
214
214
|
<div id="class_method_details" class="method_details_list">
|
|
@@ -256,9 +256,9 @@
|
|
|
256
256
|
</div>
|
|
257
257
|
|
|
258
258
|
<div id="footer">
|
|
259
|
-
Generated on
|
|
259
|
+
Generated on Thu Oct 23 08:05:57 2025 by
|
|
260
260
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
261
|
-
0.9.
|
|
261
|
+
0.9.37 (ruby-3.4.4).
|
|
262
262
|
</div>
|
|
263
263
|
|
|
264
264
|
</div>
|