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
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2b48179e41ac5f44a285eed64eb39f8a32b59ec4604a97c1aa50cc1f5c8ffa59
|
|
4
|
+
data.tar.gz: dd306d8216ee4510a4333572fd7cfdcd8f6d6f77a576fc452da0240f278c3259
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 87bcc1db3cbd88ed8c8375a13f0b39f79c58b51d37add223088fcbe71a44b04574b7e88a17b56bd627ede0dbd0ee4a36b6b6c6f56f1430eb6e26effc744dd998
|
|
7
|
+
data.tar.gz: f24b726c9058732c25692214fc6aecdc53c8b08fd61fa0122d5970483c6572218b5ca60321ee8df3fd384765841a4e4d26ea9664a40bb08331b9072a5cc98750
|
data/.irbrc
CHANGED
data/.rubocop.yml
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
inherit_from: .rubocop_todo.yml
|
data/.rubocop_todo.yml
ADDED
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
# This configuration was generated by
|
|
2
|
+
# `rubocop --auto-gen-config`
|
|
3
|
+
# on 2025-10-23 11:08:49 UTC using RuboCop version 1.75.7.
|
|
4
|
+
# The point is for the user to remove these configuration records
|
|
5
|
+
# one by one as the offenses are removed from the code base.
|
|
6
|
+
# Note that changes in the inspected code, or installation of new
|
|
7
|
+
# versions of RuboCop, may require this file to be generated again.
|
|
8
|
+
|
|
9
|
+
# Offense count: 2
|
|
10
|
+
# Configuration parameters: Severity, Include.
|
|
11
|
+
# Include: **/*.gemspec
|
|
12
|
+
Gemspec/RequiredRubyVersion:
|
|
13
|
+
Exclude:
|
|
14
|
+
- 'doing.gemspec'
|
|
15
|
+
- 'pkg/doing-2.1.89/doing.gemspec'
|
|
16
|
+
|
|
17
|
+
# Offense count: 2
|
|
18
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
19
|
+
Layout/MultilineBlockLayout:
|
|
20
|
+
Exclude:
|
|
21
|
+
- 'lib/doing/wwid/interactive.rb'
|
|
22
|
+
- 'pkg/doing-2.1.89/lib/doing/wwid/interactive.rb'
|
|
23
|
+
|
|
24
|
+
# Offense count: 2
|
|
25
|
+
Lint/DuplicateMethods:
|
|
26
|
+
Exclude:
|
|
27
|
+
- 'lib/doing/wwid/wwid.rb'
|
|
28
|
+
- 'pkg/doing-2.1.89/lib/doing/wwid/wwid.rb'
|
|
29
|
+
|
|
30
|
+
# Offense count: 2
|
|
31
|
+
# Configuration parameters: AllowComments.
|
|
32
|
+
Lint/EmptyWhen:
|
|
33
|
+
Exclude:
|
|
34
|
+
- 'lib/doing/completion.rb'
|
|
35
|
+
- 'pkg/doing-2.1.89/lib/doing/completion.rb'
|
|
36
|
+
|
|
37
|
+
# Offense count: 4
|
|
38
|
+
# Configuration parameters: AllowedParentClasses.
|
|
39
|
+
Lint/MissingSuper:
|
|
40
|
+
Exclude:
|
|
41
|
+
- 'lib/doing/errors.rb'
|
|
42
|
+
- 'pkg/doing-2.1.89/lib/doing/errors.rb'
|
|
43
|
+
|
|
44
|
+
# Offense count: 4
|
|
45
|
+
Lint/ShadowingOuterLocalVariable:
|
|
46
|
+
Exclude:
|
|
47
|
+
- 'bin/commands/tags.rb'
|
|
48
|
+
- 'lib/helpers/threaded_tests.rb'
|
|
49
|
+
- 'pkg/doing-2.1.89/bin/commands/tags.rb'
|
|
50
|
+
- 'pkg/doing-2.1.89/lib/helpers/threaded_tests.rb'
|
|
51
|
+
|
|
52
|
+
# Offense count: 8
|
|
53
|
+
# Configuration parameters: AllowKeywordBlockArguments.
|
|
54
|
+
Lint/UnderscorePrefixedVariableName:
|
|
55
|
+
Exclude:
|
|
56
|
+
- 'lib/doing/markdown_document_listener.rb'
|
|
57
|
+
- 'pkg/doing-2.1.89/lib/doing/markdown_document_listener.rb'
|
|
58
|
+
|
|
59
|
+
# Offense count: 19
|
|
60
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
61
|
+
# Configuration parameters: AutoCorrect, AllowUnusedKeywordArguments, IgnoreEmptyMethods, IgnoreNotImplementedMethods, NotImplementedExceptions.
|
|
62
|
+
# NotImplementedExceptions: NotImplementedError
|
|
63
|
+
Lint/UnusedMethodArgument:
|
|
64
|
+
Enabled: false
|
|
65
|
+
|
|
66
|
+
# Offense count: 2
|
|
67
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
68
|
+
# Configuration parameters: AutoCorrect, CheckForMethodsWithNoSideEffects.
|
|
69
|
+
Lint/Void:
|
|
70
|
+
Exclude:
|
|
71
|
+
- 'lib/doing/string/transform.rb'
|
|
72
|
+
- 'pkg/doing-2.1.89/lib/doing/string/transform.rb'
|
|
73
|
+
|
|
74
|
+
# Offense count: 316
|
|
75
|
+
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
|
|
76
|
+
Metrics/AbcSize:
|
|
77
|
+
Max: 198
|
|
78
|
+
|
|
79
|
+
# Offense count: 154
|
|
80
|
+
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
|
|
81
|
+
# AllowedMethods: refine
|
|
82
|
+
Metrics/BlockLength:
|
|
83
|
+
Max: 197
|
|
84
|
+
|
|
85
|
+
# Offense count: 36
|
|
86
|
+
# Configuration parameters: CountBlocks, CountModifierForms.
|
|
87
|
+
Metrics/BlockNesting:
|
|
88
|
+
Max: 5
|
|
89
|
+
|
|
90
|
+
# Offense count: 54
|
|
91
|
+
# Configuration parameters: CountComments, CountAsOne.
|
|
92
|
+
Metrics/ClassLength:
|
|
93
|
+
Max: 413
|
|
94
|
+
|
|
95
|
+
# Offense count: 199
|
|
96
|
+
# Configuration parameters: AllowedMethods, AllowedPatterns.
|
|
97
|
+
Metrics/CyclomaticComplexity:
|
|
98
|
+
Max: 75
|
|
99
|
+
|
|
100
|
+
# Offense count: 363
|
|
101
|
+
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
|
|
102
|
+
Metrics/MethodLength:
|
|
103
|
+
Max: 187
|
|
104
|
+
|
|
105
|
+
# Offense count: 20
|
|
106
|
+
# Configuration parameters: CountComments, CountAsOne.
|
|
107
|
+
Metrics/ModuleLength:
|
|
108
|
+
Max: 372
|
|
109
|
+
|
|
110
|
+
# Offense count: 16
|
|
111
|
+
# Configuration parameters: CountKeywordArgs, MaxOptionalParameters.
|
|
112
|
+
Metrics/ParameterLists:
|
|
113
|
+
Max: 9
|
|
114
|
+
|
|
115
|
+
# Offense count: 163
|
|
116
|
+
# Configuration parameters: AllowedMethods, AllowedPatterns.
|
|
117
|
+
Metrics/PerceivedComplexity:
|
|
118
|
+
Max: 82
|
|
119
|
+
|
|
120
|
+
# Offense count: 4
|
|
121
|
+
Naming/AccessorMethodName:
|
|
122
|
+
Exclude:
|
|
123
|
+
- 'lib/doing/plugins/export/dayone_export.rb'
|
|
124
|
+
- 'lib/doing/plugins/export/markdown_export.rb'
|
|
125
|
+
- 'pkg/doing-2.1.89/lib/doing/plugins/export/dayone_export.rb'
|
|
126
|
+
- 'pkg/doing-2.1.89/lib/doing/plugins/export/markdown_export.rb'
|
|
127
|
+
|
|
128
|
+
# Offense count: 8
|
|
129
|
+
# Configuration parameters: ExpectMatchingDefinition, CheckDefinitionPathHierarchy, CheckDefinitionPathHierarchyRoots, Regex, IgnoreExecutableScripts, AllowedAcronyms.
|
|
130
|
+
# CheckDefinitionPathHierarchyRoots: lib, spec, test, src
|
|
131
|
+
# AllowedAcronyms: CLI, DSL, ACL, API, ASCII, CPU, CSS, DNS, EOF, GUID, HTML, HTTP, HTTPS, ID, IP, JSON, LHS, QPS, RAM, RHS, RPC, SLA, SMTP, SQL, SSH, TCP, TLS, TTL, UDP, UI, UID, UUID, URI, URL, UTF8, VM, XML, XMPP, XSRF, XSS
|
|
132
|
+
Naming/FileName:
|
|
133
|
+
Exclude:
|
|
134
|
+
- 'Rakefile.rb'
|
|
135
|
+
- 'test/doing_unit-good_test.rb'
|
|
136
|
+
- 'test/doing_unit-item_test.rb'
|
|
137
|
+
- 'test/doing_unit-items_test.rb'
|
|
138
|
+
- 'test/doing_unit-normalize_test.rb'
|
|
139
|
+
- 'test/doing_unit-note_test.rb'
|
|
140
|
+
- 'test/doing_unit-time_test.rb'
|
|
141
|
+
- 'test/doing_unit-util_test.rb'
|
|
142
|
+
- 'test/helpers/doing-helpers.rb'
|
|
143
|
+
|
|
144
|
+
# Offense count: 12
|
|
145
|
+
# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
|
|
146
|
+
# AllowedNames: as, at, by, cc, db, id, if, in, io, ip, of, on, os, pp, to
|
|
147
|
+
Naming/MethodParameterName:
|
|
148
|
+
Exclude:
|
|
149
|
+
- 'lib/helpers/threaded_tests.rb'
|
|
150
|
+
- 'pkg/doing-2.1.89/lib/helpers/threaded_tests.rb'
|
|
151
|
+
- 'test/doing_chronify_test.rb'
|
|
152
|
+
- 'test/doing_done_test.rb'
|
|
153
|
+
- 'test/doing_finish_test.rb'
|
|
154
|
+
- 'test/doing_finishtimed_test.rb'
|
|
155
|
+
- 'test/helpers/doing-helpers.rb'
|
|
156
|
+
- 'test/helpers/fake_std_out.rb'
|
|
157
|
+
|
|
158
|
+
# Offense count: 2
|
|
159
|
+
# Configuration parameters: NamePrefix, ForbiddenPrefixes, AllowedMethods, MethodDefinitionMacros, UseSorbetSigs.
|
|
160
|
+
# NamePrefix: is_, has_, have_, does_
|
|
161
|
+
# ForbiddenPrefixes: is_, has_, have_, does_
|
|
162
|
+
# AllowedMethods: is_a?
|
|
163
|
+
# MethodDefinitionMacros: define_method, define_singleton_method
|
|
164
|
+
Naming/PredicateName:
|
|
165
|
+
Exclude:
|
|
166
|
+
- 'spec/**/*'
|
|
167
|
+
- 'lib/doing/chronify/string.rb'
|
|
168
|
+
- 'pkg/doing-2.1.89/lib/doing/chronify/string.rb'
|
|
169
|
+
|
|
170
|
+
# Offense count: 8
|
|
171
|
+
# Configuration parameters: EnforcedStyle, CheckMethodNames, CheckSymbols, AllowedIdentifiers, AllowedPatterns.
|
|
172
|
+
# SupportedStyles: snake_case, normalcase, non_integer
|
|
173
|
+
# AllowedIdentifiers: TLS1_1, TLS1_2, capture3, iso8601, rfc1123_date, rfc822, rfc2822, rfc3339, x86_64
|
|
174
|
+
Naming/VariableNumber:
|
|
175
|
+
Exclude:
|
|
176
|
+
- 'lib/helpers/fzf/test/test_go.rb'
|
|
177
|
+
- 'pkg/doing-2.1.89/lib/helpers/fzf/test/test_go.rb'
|
|
178
|
+
|
|
179
|
+
# Offense count: 2
|
|
180
|
+
Security/Eval:
|
|
181
|
+
Exclude:
|
|
182
|
+
- 'Rakefile'
|
|
183
|
+
- 'pkg/doing-2.1.89/Rakefile'
|
|
184
|
+
|
|
185
|
+
# Offense count: 2
|
|
186
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
187
|
+
Style/CombinableLoops:
|
|
188
|
+
Exclude:
|
|
189
|
+
- 'lib/helpers/threaded_tests.rb'
|
|
190
|
+
- 'pkg/doing-2.1.89/lib/helpers/threaded_tests.rb'
|
|
191
|
+
|
|
192
|
+
# Offense count: 132
|
|
193
|
+
# Configuration parameters: AllowedConstants.
|
|
194
|
+
Style/Documentation:
|
|
195
|
+
Enabled: false
|
|
196
|
+
|
|
197
|
+
# Offense count: 10
|
|
198
|
+
# Configuration parameters: AllowedVariables.
|
|
199
|
+
Style/GlobalVars:
|
|
200
|
+
Exclude:
|
|
201
|
+
- 'pkg/doing-2.1.89/scripts/deploy.rb'
|
|
202
|
+
- 'scripts/deploy.rb'
|
|
203
|
+
|
|
204
|
+
# Offense count: 4
|
|
205
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
206
|
+
Style/IdenticalConditionalBranches:
|
|
207
|
+
Exclude:
|
|
208
|
+
- 'lib/doing/plugins/export/dayone_export.rb'
|
|
209
|
+
- 'pkg/doing-2.1.89/lib/doing/plugins/export/dayone_export.rb'
|
|
210
|
+
|
|
211
|
+
# Offense count: 84
|
|
212
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
213
|
+
Style/IfUnlessModifier:
|
|
214
|
+
Enabled: false
|
|
215
|
+
|
|
216
|
+
# Offense count: 8
|
|
217
|
+
Style/MixinUsage:
|
|
218
|
+
Exclude:
|
|
219
|
+
- '.irbrc'
|
|
220
|
+
- 'bin/doing'
|
|
221
|
+
- 'pkg/doing-2.1.89/.irbrc'
|
|
222
|
+
- 'pkg/doing-2.1.89/bin/doing'
|
|
223
|
+
|
|
224
|
+
# Offense count: 2
|
|
225
|
+
Style/MultilineBlockChain:
|
|
226
|
+
Exclude:
|
|
227
|
+
- 'lib/doing/logger.rb'
|
|
228
|
+
- 'pkg/doing-2.1.89/lib/doing/logger.rb'
|
|
229
|
+
|
|
230
|
+
# Offense count: 20
|
|
231
|
+
Style/OptionalArguments:
|
|
232
|
+
Exclude:
|
|
233
|
+
- 'lib/doing/wwid/display.rb'
|
|
234
|
+
- 'lib/doing/wwid/modify.rb'
|
|
235
|
+
- 'pkg/doing-2.1.89/lib/doing/wwid/display.rb'
|
|
236
|
+
- 'pkg/doing-2.1.89/lib/doing/wwid/modify.rb'
|
|
237
|
+
|
|
238
|
+
# Offense count: 2
|
|
239
|
+
# Configuration parameters: AllowedMethods.
|
|
240
|
+
# AllowedMethods: respond_to_missing?
|
|
241
|
+
Style/OptionalBooleanParameter:
|
|
242
|
+
Exclude:
|
|
243
|
+
- 'lib/doing/wwid/display.rb'
|
|
244
|
+
- 'pkg/doing-2.1.89/lib/doing/wwid/display.rb'
|
|
245
|
+
|
|
246
|
+
# Offense count: 190
|
|
247
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
248
|
+
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns, SplitStrings.
|
|
249
|
+
# URISchemes: http, https
|
|
250
|
+
Layout/LineLength:
|
|
251
|
+
Max: 334
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,25 @@
|
|
|
1
|
+
### 2.1.90
|
|
2
|
+
|
|
3
|
+
2025-10-23 06:25
|
|
4
|
+
|
|
5
|
+
#### NEW
|
|
6
|
+
|
|
7
|
+
- Add benchmark_stats() and all_benchmark_stats() for detailed analysis
|
|
8
|
+
- Add benchmark_summary() for compact performance overview
|
|
9
|
+
|
|
10
|
+
#### IMPROVED
|
|
11
|
+
|
|
12
|
+
- Add 4-decimal-place rounding to all benchmark timing outputs
|
|
13
|
+
- Implement new measure() method for automatic start/finish timing
|
|
14
|
+
- Optimize log_benchmarks() with better sorting and I/O efficiency
|
|
15
|
+
|
|
16
|
+
#### FIXED
|
|
17
|
+
|
|
18
|
+
- Fix coloring? method to return boolean instead of nil
|
|
19
|
+
- Move color method definitions to class methods (Doing::Color.reset)
|
|
20
|
+
- Add string extension methods for all color attributes ("text".reset)
|
|
21
|
+
- Move attributes() method to class methods for proper access
|
|
22
|
+
|
|
1
23
|
### 2.1.89
|
|
2
24
|
|
|
3
25
|
2025-05-19 04:35
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
data/Rakefile
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
require 'rake/clean'
|
|
2
4
|
require 'rubygems'
|
|
3
5
|
require 'rubygems/package_task'
|
|
@@ -11,9 +13,9 @@ require 'parallel_tests/tasks'
|
|
|
11
13
|
require 'tty-spinner'
|
|
12
14
|
|
|
13
15
|
YARD::Rake::YardocTask.new do |t|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
t.files = ['lib/doing/*.rb']
|
|
17
|
+
t.options = ['--markup-provider=redcarpet', '--markup=markdown', '--no-private', '-p', 'yard_templates']
|
|
18
|
+
# t.stats_options = ['--list-undoc']
|
|
17
19
|
end
|
|
18
20
|
|
|
19
21
|
task :doc, [*Rake.application[:yard].arg_names] => [:yard]
|
data/bin/commands/changes.rb
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
# @@changelog @@changes
|
|
2
4
|
require 'tty-markdown'
|
|
3
5
|
|
|
@@ -18,7 +20,7 @@ MARKDOWN_THEME = {
|
|
|
18
20
|
module Doing
|
|
19
21
|
# changes command methods
|
|
20
22
|
class ChangesCommand
|
|
21
|
-
CHANGE_RX = /^(?:(?:(?:[<>=]+|p(?:rior)|b(?:efore)|o(?:lder)|s(?:ince)|a(?:fter)|n(?:ewer))? *[0-9.*?]{1,10} *)+|(?:[\d.]+ *(?:-|to)+ *[0-9.]{1,10}))
|
|
23
|
+
CHANGE_RX = /^(?:(?:(?:[<>=]+|p(?:rior)|b(?:efore)|o(?:lder)|s(?:ince)|a(?:fter)|n(?:ewer))? *[0-9.*?]{1,10} *)+|(?:[\d.]+ *(?:-|to)+ *[0-9.]{1,10}))$/.freeze
|
|
22
24
|
|
|
23
25
|
def add_options(cmd)
|
|
24
26
|
cmd.desc 'Display all versions'
|
data/bin/commands/choose.rb
CHANGED
data/bin/commands/colors.rb
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
# @@colors
|
|
2
4
|
desc 'List available color variables for configuration templates and views'
|
|
3
5
|
command :colors do |c|
|
|
4
6
|
c.action do |_global_options, _options, _args|
|
|
5
7
|
bgs = []
|
|
6
8
|
fgs = []
|
|
7
|
-
@colors
|
|
9
|
+
@colors.attributes.each do |color|
|
|
8
10
|
colname = color.to_s
|
|
9
11
|
colname << " (#{color.to_s.sub(/bold/, 'bright')})" if colname =~ /bold/
|
|
10
12
|
if color.to_s =~ /bg/
|
|
11
|
-
bgs.push("#{@colors.send(color,
|
|
13
|
+
bgs.push("#{@colors.send(color, ' ')}#{@colors.default} <-- #{colname}")
|
|
12
14
|
else
|
|
13
|
-
fgs.push("#{@colors.send(color,
|
|
15
|
+
fgs.push("#{@colors.send(color, 'XXXX')}#{@colors.default} <-- #{colname}")
|
|
14
16
|
end
|
|
15
17
|
end
|
|
16
18
|
out = []
|
|
@@ -17,7 +17,7 @@ module Doing
|
|
|
17
17
|
def all_flags?(options, args)
|
|
18
18
|
args.each do |arg|
|
|
19
19
|
has_flag = false
|
|
20
|
-
options.flags.merge(options.switches).
|
|
20
|
+
options.flags.merge(options.switches).each_value do |flag|
|
|
21
21
|
if flag.name == arg.to_sym || flag.aliases&.include?(arg.to_sym)
|
|
22
22
|
has_flag = true
|
|
23
23
|
break
|
|
@@ -31,7 +31,7 @@ module Doing
|
|
|
31
31
|
|
|
32
32
|
def any_flags?(options, args)
|
|
33
33
|
args.each do |option|
|
|
34
|
-
options.flags.merge(options.switches).
|
|
34
|
+
options.flags.merge(options.switches).each_value do |flag|
|
|
35
35
|
return true if flag.name == option.to_sym || flag.aliases&.include?(option.to_sym)
|
|
36
36
|
end
|
|
37
37
|
end
|
|
@@ -41,7 +41,7 @@ module Doing
|
|
|
41
41
|
|
|
42
42
|
def no_flags?(options, args)
|
|
43
43
|
args.each do |option|
|
|
44
|
-
options.flags.merge(options.switches).
|
|
44
|
+
options.flags.merge(options.switches).each_value do |flag|
|
|
45
45
|
return false if flag.name == option.to_sym || flag.aliases&.include?(option.to_sym)
|
|
46
46
|
end
|
|
47
47
|
end
|
data/bin/commands/completion.rb
CHANGED
|
@@ -22,7 +22,8 @@ command :completion do |c|
|
|
|
22
22
|
c.arg_name "[#{SHELLS.join('|')}]"
|
|
23
23
|
c.command :generate do |gen|
|
|
24
24
|
gen.example 'doing completion generate fish', desc: 'Generate fish completion script and link to autoload directory'
|
|
25
|
-
gen.example 'doing completion generate zsh --file ~/.zsh-completions/doing.zsh',
|
|
25
|
+
gen.example 'doing completion generate zsh --file ~/.zsh-completions/doing.zsh',
|
|
26
|
+
desc: 'Generate zsh completion script and save to alternative file'
|
|
26
27
|
|
|
27
28
|
gen.desc 'Alternative file to write output to'
|
|
28
29
|
gen.arg_name 'PATH'
|
data/bin/commands/config.rb
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
# @@config
|
|
2
4
|
desc 'Edit the configuration file or output a value from it'
|
|
3
5
|
long_desc %(Run without arguments, `doing config` opens your `config.yml` in an editor.
|
|
@@ -232,18 +234,18 @@ command :config do |c|
|
|
|
232
234
|
|
|
233
235
|
cfg = Doing::Util.safe_load_file(config_file) || {}
|
|
234
236
|
|
|
235
|
-
|
|
237
|
+
warn "> Config: Updating #{config_file}".yellow
|
|
236
238
|
|
|
237
239
|
if options[:remove]
|
|
238
|
-
|
|
240
|
+
warn "#{'Deleting key:'.yellow} #{real_path.join('.').boldwhite}"
|
|
239
241
|
cfg.deep_set(real_path, nil)
|
|
240
242
|
else
|
|
241
243
|
current_value = cfg.dig(*real_path)
|
|
242
244
|
cfg.deep_set(real_path, value.set_type(old_type))
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
245
|
+
warn "#{' Key path:'.yellow} #{real_path.join('.').boldwhite}"
|
|
246
|
+
warn "#{' Inherited:'.yellow} #{(old_value ? old_value.to_s : 'empty').boldwhite}"
|
|
247
|
+
warn "#{' Current:'.yellow} #{(current_value ? current_value.to_s : 'empty').boldwhite}"
|
|
248
|
+
warn "#{' New:'.yellow} #{value.set_type(old_type).to_s.boldwhite}"
|
|
247
249
|
end
|
|
248
250
|
|
|
249
251
|
res = Doing::Prompt.yn('Update selected config', default_response: true)
|
data/bin/commands/done.rb
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
# @@done @@did
|
|
2
4
|
desc 'Add a completed item with @done(date). No argument finishes last entry'
|
|
3
5
|
long_desc 'Use this command to add an entry after you\'ve already finished it. It will be immediately marked as @done.
|
|
@@ -7,8 +9,10 @@ arg_name 'ENTRY', optional: true
|
|
|
7
9
|
command %i[done did] do |c|
|
|
8
10
|
c.example 'doing done', desc: 'Tag the last entry @done'
|
|
9
11
|
c.example 'doing done I already finished this', desc: 'Add a new entry and immediately mark it @done'
|
|
10
|
-
c.example 'doing done --back 30m This took me half an hour',
|
|
11
|
-
|
|
12
|
+
c.example 'doing done --back 30m This took me half an hour',
|
|
13
|
+
desc: 'Add an entry with a start date 30 minutes ago and a @done date of right now'
|
|
14
|
+
c.example 'doing done --at 3pm --took 1h Started and finished this afternoon',
|
|
15
|
+
desc: 'Add an entry with a @done date of 3pm and a start date of 2pm (3pm - 1h)'
|
|
12
16
|
|
|
13
17
|
c.desc 'Remove @done tag'
|
|
14
18
|
c.switch %i[r remove], negatable: false, default_value: false
|
|
@@ -78,11 +82,11 @@ command %i[done did] do |c|
|
|
|
78
82
|
donedate = finish_date.strftime('%F %R')
|
|
79
83
|
end
|
|
80
84
|
|
|
81
|
-
if options[:section]
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
85
|
+
section = if options[:section]
|
|
86
|
+
@wwid.guess_section(options[:section]) || options[:section].cap_first
|
|
87
|
+
else
|
|
88
|
+
Doing.setting('current_section')
|
|
89
|
+
end
|
|
86
90
|
|
|
87
91
|
note = Doing::Note.new
|
|
88
92
|
note.add(options[:note]) if options[:note]
|
|
@@ -95,7 +99,9 @@ command %i[done did] do |c|
|
|
|
95
99
|
is_new = false
|
|
96
100
|
|
|
97
101
|
if args.empty?
|
|
98
|
-
last_entry = @wwid.filter_items([],
|
|
102
|
+
last_entry = @wwid.filter_items([],
|
|
103
|
+
opt: { unfinished: options[:unfinished], section: section, count: 1,
|
|
104
|
+
age: :newest }).max_by(&:date)
|
|
99
105
|
|
|
100
106
|
unless last_entry
|
|
101
107
|
Doing.logger.debug('Skipped:', options[:unfinished] ? 'No unfinished entry' : 'Last entry already @done')
|
|
@@ -104,7 +110,8 @@ command %i[done did] do |c|
|
|
|
104
110
|
|
|
105
111
|
old_entry = last_entry.clone
|
|
106
112
|
last_entry.note.add(note)
|
|
107
|
-
input = ["#{last_entry.date.strftime('%F %R | ')}#{last_entry.title}",
|
|
113
|
+
input = ["#{last_entry.date.strftime('%F %R | ')}#{last_entry.title}",
|
|
114
|
+
last_entry.note.strip_lines.join("\n")].join("\n")
|
|
108
115
|
else
|
|
109
116
|
is_new = true
|
|
110
117
|
input = ["#{date.strftime('%F %R | ')}#{args.join(' ')}", note.strip_lines.join("\n")].join("\n")
|
|
@@ -135,7 +142,7 @@ command %i[done did] do |c|
|
|
|
135
142
|
end
|
|
136
143
|
end
|
|
137
144
|
|
|
138
|
-
if
|
|
145
|
+
if is_new
|
|
139
146
|
Doing::Hooks.trigger :pre_entry_add, @wwid, new_entry
|
|
140
147
|
@wwid.content.push(new_entry)
|
|
141
148
|
Doing::Hooks.trigger :post_entry_added, @wwid, new_entry
|
|
@@ -163,7 +170,7 @@ command %i[done did] do |c|
|
|
|
163
170
|
note: note,
|
|
164
171
|
section: section,
|
|
165
172
|
tags: ['done'],
|
|
166
|
-
took: took
|
|
173
|
+
took: took.zero? ? nil : took,
|
|
167
174
|
unfinished: options[:unfinished]
|
|
168
175
|
}
|
|
169
176
|
@wwid.tag_last(opt)
|
|
@@ -196,7 +203,7 @@ command %i[done did] do |c|
|
|
|
196
203
|
@wwid.write(@wwid.doing_file)
|
|
197
204
|
Doing.logger.info('New entry:', %(added "#{new_entry.date.relative_date}: #{new_entry.title}" to #{section}))
|
|
198
205
|
elsif !global_options[:stdin].nil?
|
|
199
|
-
|
|
206
|
+
Doing::Note.new(options[:note])
|
|
200
207
|
d, title, note = @wwid.format_input(global_options[:stdin])
|
|
201
208
|
unless d.nil?
|
|
202
209
|
Doing.logger.debug('Parser:', 'Date detected in input, overriding command line values')
|
data/bin/commands/finish.rb
CHANGED
|
@@ -10,8 +10,10 @@ module Doing
|
|
|
10
10
|
|
|
11
11
|
def add_examples(cmd)
|
|
12
12
|
cmd.example 'doing finish', desc: 'Mark the last entry @done'
|
|
13
|
-
cmd.example 'doing finish --auto --section Later 10',
|
|
14
|
-
|
|
13
|
+
cmd.example 'doing finish --auto --section Later 10',
|
|
14
|
+
desc: 'Add @done to any unfinished entries in the last 10 in Later, setting the finish time based on the start time of the task after it'
|
|
15
|
+
cmd.example 'doing finish --search "a specific entry" --at "yesterday 3pm"',
|
|
16
|
+
desc: 'Search for an entry containing string and set its @done time to yesterday at 3pm'
|
|
15
17
|
end
|
|
16
18
|
|
|
17
19
|
def add_options(cmd)
|
data/bin/commands/grep.rb
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
# @@grep @@search
|
|
2
4
|
desc 'Search for entries'
|
|
3
5
|
long_desc %(
|
|
@@ -8,9 +10,11 @@ To search with regular expressions, single quote the string and surround with sl
|
|
|
8
10
|
arg_name 'SEARCH_PATTERN'
|
|
9
11
|
command %i[grep search] do |c|
|
|
10
12
|
c.example 'doing grep "doing wiki"', desc: 'Find entries containing "doing wiki" using fuzzy matching'
|
|
11
|
-
c.example 'doing search "\'search command"',
|
|
13
|
+
c.example 'doing search "\'search command"',
|
|
14
|
+
desc: 'Find entries containing "search command" using exact matching (search is an alias for grep)'
|
|
12
15
|
c.example 'doing grep "/do.*?wiki.*?@done/"', desc: 'Find entries matching regular expression'
|
|
13
|
-
c.example 'doing search --before 12/21 "doing wiki"',
|
|
16
|
+
c.example 'doing search --before 12/21 "doing wiki"',
|
|
17
|
+
desc: 'Find entries containing "doing wiki" with entry dates before 12/21 of the current year'
|
|
14
18
|
c.example 'doing grep @project1 -s currently -s projects', desc: 'Search only in Currently and Projects'
|
|
15
19
|
|
|
16
20
|
c.desc 'Section'
|
|
@@ -29,13 +33,13 @@ command %i[grep search] do |c|
|
|
|
29
33
|
default_value: Doing.setting('search.case', :smart).normalize_case,
|
|
30
34
|
type: CaseSymbol
|
|
31
35
|
|
|
32
|
-
c.desc
|
|
36
|
+
c.desc 'Highlight search matches in output. Only affects command line output'
|
|
33
37
|
c.switch %i[h hilite], default_value: Doing.settings.dig('search', 'highlight')
|
|
34
38
|
|
|
35
39
|
c.desc "Edit matching entries with #{Doing::Util.default_editor}"
|
|
36
40
|
c.switch %i[e editor], negatable: false, default_value: false
|
|
37
41
|
|
|
38
|
-
c.desc
|
|
42
|
+
c.desc 'Delete matching entries'
|
|
39
43
|
c.switch %i[d delete], negatable: false, default_value: false
|
|
40
44
|
|
|
41
45
|
c.desc 'Display an interactive menu of results to perform further operations'
|
|
@@ -76,6 +80,6 @@ command %i[grep search] do |c|
|
|
|
76
80
|
options[:after] = Doing.original_options[:date_end] if Doing.original_options[:date_end].good?
|
|
77
81
|
options[:from] = Doing.original_options[:date_range] if Doing.original_options[:date_range].good?
|
|
78
82
|
Doing.config.save_view(options.to_view, options[:save].downcase)
|
|
79
|
-
|
|
83
|
+
end
|
|
80
84
|
end
|
|
81
85
|
end
|
data/bin/commands/import.rb
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
# @@import
|
|
2
4
|
desc 'Import entries from an external source'
|
|
3
|
-
long_desc "Imports entries from other sources. Available plugins: #{Doing::Plugins.plugin_names(type: :import,
|
|
5
|
+
long_desc "Imports entries from other sources. Available plugins: #{Doing::Plugins.plugin_names(type: :import,
|
|
6
|
+
separator: ', ')}"
|
|
4
7
|
arg_name 'PATH'
|
|
5
8
|
command :import do |c|
|
|
6
9
|
c.example 'doing import --type timing "~/Desktop/All Activities.json"', desc: 'Import a Timing.app JSON report'
|
|
7
|
-
c.example 'doing import --type doing --tag imported --no-autotag ~/doing_backup.md',
|
|
8
|
-
|
|
10
|
+
c.example 'doing import --type doing --tag imported --no-autotag ~/doing_backup.md',
|
|
11
|
+
desc: 'Import an Doing archive, tag all entries with @imported, skip autotagging'
|
|
12
|
+
c.example 'doing import --type doing --from "10/1 to 10/15" ~/doing_backup.md',
|
|
13
|
+
desc: 'Import a Doing archive, only importing entries between two dates'
|
|
9
14
|
|
|
10
15
|
c.desc "Import type (#{Doing::Plugins.plugin_names(type: :import)})"
|
|
11
16
|
c.arg_name 'TYPE'
|
|
@@ -40,9 +45,7 @@ command :import do |c|
|
|
|
40
45
|
|
|
41
46
|
c.action do |_global_options, options, args|
|
|
42
47
|
options[:fuzzy] = false
|
|
43
|
-
if options[:section]
|
|
44
|
-
options[:section] = @wwid.guess_section(options[:section]) || options[:section].cap_first
|
|
45
|
-
end
|
|
48
|
+
options[:section] = @wwid.guess_section(options[:section]) || options[:section].cap_first if options[:section]
|
|
46
49
|
|
|
47
50
|
if options[:search]
|
|
48
51
|
search = options[:search]
|
|
@@ -60,12 +63,12 @@ command :import do |c|
|
|
|
60
63
|
options[:date_filter][0] = options[:after] || Time.now - (1 << 64)
|
|
61
64
|
end
|
|
62
65
|
|
|
63
|
-
|
|
64
|
-
options[:no_overlap] = !options[:overlap]
|
|
65
|
-
@wwid.import(args, options)
|
|
66
|
-
@wwid.write(@wwid.doing_file)
|
|
67
|
-
else
|
|
66
|
+
unless options[:type] =~ Doing::Plugins.plugin_regex(type: :import)
|
|
68
67
|
raise InvalidPluginType, "Invalid import type: #{options[:type]}"
|
|
69
68
|
end
|
|
69
|
+
|
|
70
|
+
options[:no_overlap] = !options[:overlap]
|
|
71
|
+
@wwid.import(args, options)
|
|
72
|
+
@wwid.write(@wwid.doing_file)
|
|
70
73
|
end
|
|
71
74
|
end
|
data/bin/commands/install_fzf.rb
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
# @@install_fzf
|
|
2
4
|
command :install_fzf do |c|
|
|
3
5
|
c.desc 'Force reinstall'
|
|
@@ -6,12 +8,12 @@ command :install_fzf do |c|
|
|
|
6
8
|
c.desc 'Uninstall'
|
|
7
9
|
c.switch %i[u uninstall], default_value: false, negatable: false
|
|
8
10
|
|
|
9
|
-
c.action do |
|
|
11
|
+
c.action do |_g, o, _a|
|
|
10
12
|
if o[:uninstall]
|
|
11
13
|
Doing::Prompt.uninstall_fzf
|
|
12
14
|
else
|
|
13
15
|
Doing.logger.warn('fzf:', 'force reinstall') if o[:reinstall]
|
|
14
|
-
|
|
16
|
+
Doing::Prompt.install_fzf(force: o[:reinstall])
|
|
15
17
|
end
|
|
16
18
|
end
|
|
17
19
|
end
|