doing 2.1.46 → 2.1.47
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 +10 -0
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/bin/commands/config.rb +1 -1
- data/bin/commands/last.rb +1 -1
- data/bin/commands/recent.rb +1 -1
- data/docs/doc/Array.html +1 -1
- data/docs/doc/BooleanTermParser/Clause.html +1 -1
- data/docs/doc/BooleanTermParser/Operator.html +1 -1
- data/docs/doc/BooleanTermParser/Query.html +1 -1
- data/docs/doc/BooleanTermParser/QueryParser.html +1 -1
- data/docs/doc/BooleanTermParser/QueryTransformer.html +1 -1
- data/docs/doc/BooleanTermParser.html +1 -1
- data/docs/doc/Doing/ArrayCleanup.html +1 -1
- data/docs/doc/Doing/ArrayNestedHash.html +1 -1
- data/docs/doc/Doing/ArrayTags.html +1 -1
- data/docs/doc/Doing/CSVExport.html +1 -1
- data/docs/doc/Doing/CalendarImport.html +1 -1
- data/docs/doc/Doing/Change.html +1 -1
- data/docs/doc/Doing/Changes.html +1 -1
- data/docs/doc/Doing/ChronifyArray.html +1 -1
- data/docs/doc/Doing/ChronifyNumeric.html +1 -1
- data/docs/doc/Doing/ChronifyString.html +1 -1
- data/docs/doc/Doing/Color.html +1 -1
- data/docs/doc/Doing/Completion/BashCompletions.html +1 -1
- data/docs/doc/Doing/Completion/FishCompletions.html +1 -1
- data/docs/doc/Doing/Completion/StringUtils.html +1 -1
- data/docs/doc/Doing/Completion/ZshCompletions.html +1 -1
- data/docs/doc/Doing/Completion.html +1 -1
- data/docs/doc/Doing/Configuration.html +1 -1
- data/docs/doc/Doing/DayOneRenderer.html +1 -1
- data/docs/doc/Doing/DayoneExport.html +1 -1
- data/docs/doc/Doing/DoingImport.html +1 -1
- data/docs/doc/Doing/Entry.html +1 -1
- data/docs/doc/Doing/Errors/DoingNoTraceError.html +1 -1
- data/docs/doc/Doing/Errors/DoingRuntimeError.html +1 -1
- data/docs/doc/Doing/Errors/DoingStandardError.html +1 -1
- data/docs/doc/Doing/Errors/EmptyInput.html +1 -1
- data/docs/doc/Doing/Errors/HistoryLimitError.html +1 -1
- data/docs/doc/Doing/Errors/InvalidPlugin.html +1 -1
- data/docs/doc/Doing/Errors/MissingBackupFile.html +1 -1
- data/docs/doc/Doing/Errors/NoResults.html +1 -1
- data/docs/doc/Doing/Errors/PluginException.html +1 -1
- data/docs/doc/Doing/Errors/UserCancelled.html +1 -1
- data/docs/doc/Doing/Errors/WrongCommand.html +1 -1
- data/docs/doc/Doing/Errors.html +1 -1
- data/docs/doc/Doing/HTMLExport.html +1 -1
- data/docs/doc/Doing/Hooks.html +1 -1
- data/docs/doc/Doing/Item.html +1 -1
- data/docs/doc/Doing/ItemDates.html +1 -1
- data/docs/doc/Doing/ItemQuery.html +1 -1
- data/docs/doc/Doing/ItemState.html +1 -1
- data/docs/doc/Doing/ItemTags.html +1 -1
- data/docs/doc/Doing/Items.html +1 -1
- data/docs/doc/Doing/JSONExport.html +1 -1
- data/docs/doc/Doing/JSONImport.html +295 -0
- data/docs/doc/Doing/Logger.html +1 -1
- data/docs/doc/Doing/MarkdownExport.html +1 -1
- data/docs/doc/Doing/Note.html +1 -1
- data/docs/doc/Doing/Pager.html +1 -1
- data/docs/doc/Doing/Plugins.html +1 -1
- data/docs/doc/Doing/Prompt.html +1 -1
- data/docs/doc/Doing/PromptChoose.html +1 -1
- data/docs/doc/Doing/PromptFZF.html +1 -1
- data/docs/doc/Doing/PromptInput.html +1 -1
- data/docs/doc/Doing/PromptSTD.html +1 -1
- data/docs/doc/Doing/PromptYN.html +1 -1
- data/docs/doc/Doing/Section.html +1 -1
- data/docs/doc/Doing/StringHighlight.html +1 -1
- data/docs/doc/Doing/StringNormalize.html +1 -1
- data/docs/doc/Doing/StringQuery.html +1 -1
- data/docs/doc/Doing/StringTags.html +1 -1
- data/docs/doc/Doing/StringTransform.html +1 -1
- data/docs/doc/Doing/StringTruncate.html +1 -1
- data/docs/doc/Doing/StringURL.html +1 -1
- data/docs/doc/Doing/SymbolNormalize.html +1 -1
- data/docs/doc/Doing/TaskPaperExport.html +1 -1
- data/docs/doc/Doing/TemplateExport.html +1 -1
- data/docs/doc/Doing/TemplateString.html +1 -1
- data/docs/doc/Doing/TimingImport.html +1 -1
- data/docs/doc/Doing/Types.html +1 -1
- data/docs/doc/Doing/Util/Backup.html +1 -1
- data/docs/doc/Doing/Util.html +2 -2
- data/docs/doc/Doing/Version.html +1 -1
- data/docs/doc/Doing/WWID.html +1 -1
- data/docs/doc/Doing.html +4 -4
- data/docs/doc/FalseClass.html +1 -1
- data/docs/doc/GLI/Commands/Help.html +1 -1
- data/docs/doc/GLI/Commands/MarkdownDocumentListener.html +1 -1
- data/docs/doc/GLI/Commands.html +1 -1
- data/docs/doc/GLI.html +1 -1
- data/docs/doc/Hash.html +1 -1
- data/docs/doc/Numeric.html +1 -1
- data/docs/doc/Object.html +1 -1
- data/docs/doc/PhraseParser/Operator.html +1 -1
- data/docs/doc/PhraseParser/PhraseClause.html +1 -1
- data/docs/doc/PhraseParser/Query.html +1 -1
- data/docs/doc/PhraseParser/QueryParser.html +1 -1
- data/docs/doc/PhraseParser/QueryTransformer.html +1 -1
- data/docs/doc/PhraseParser/TermClause.html +1 -1
- data/docs/doc/PhraseParser.html +1 -1
- data/docs/doc/Status.html +1 -1
- data/docs/doc/String.html +1 -1
- data/docs/doc/Symbol.html +1 -1
- data/docs/doc/Time.html +1 -1
- data/docs/doc/TrueClass.html +1 -1
- data/docs/doc/_index.html +12 -5
- data/docs/doc/class_list.html +1 -1
- data/docs/doc/file.README.html +2 -2
- data/docs/doc/index.html +2 -2
- data/docs/doc/method_list.html +139 -123
- data/docs/doc/top-level-namespace.html +1 -1
- data/doing.rdoc +17 -17
- data/lib/doing/add_options.rb +1 -1
- data/lib/doing/plugin_manager.rb +1 -1
- data/lib/doing/plugins/export/doing_export.rb +39 -0
- data/lib/doing/plugins/export/template_export.rb +4 -2
- data/lib/doing/plugins/import/doing_import.rb +17 -6
- data/lib/doing/plugins/import/json_import.rb +1 -0
- data/lib/doing/version.rb +1 -1
- metadata +4 -2
|
@@ -216,7 +216,7 @@
|
|
|
216
216
|
</div>
|
|
217
217
|
|
|
218
218
|
<div id="footer">
|
|
219
|
-
Generated on
|
|
219
|
+
Generated on Sat Mar 26 15:03:56 2022 by
|
|
220
220
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
221
221
|
0.9.27 (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.
|
|
8
|
+
v2.1.47
|
|
9
9
|
|
|
10
10
|
=== Global Options
|
|
11
11
|
=== --config_file arg
|
|
@@ -98,7 +98,7 @@ Backdate start date for new entry to date string [4pm|20m|2h|yesterday noon]
|
|
|
98
98
|
|
|
99
99
|
===== --bool BOOLEAN
|
|
100
100
|
|
|
101
|
-
Boolean used to combine multiple tags. Use PATTERN to parse + and - as booleans
|
|
101
|
+
Boolean used to combine multiple tags (AND|OR|NOT). Use PATTERN to parse + and - as booleans
|
|
102
102
|
|
|
103
103
|
[Default Value] pattern
|
|
104
104
|
[Must Match] (?i-mx:^(?:and|all|any|or|not|none|p(?:at(?:tern)?)?)$)
|
|
@@ -211,7 +211,7 @@ Archive entries older than date (natural language).
|
|
|
211
211
|
|
|
212
212
|
===== --bool BOOLEAN
|
|
213
213
|
|
|
214
|
-
Boolean used to combine multiple tags. Use PATTERN to parse + and - as booleans
|
|
214
|
+
Boolean used to combine multiple tags (AND|OR|NOT). Use PATTERN to parse + and - as booleans
|
|
215
215
|
|
|
216
216
|
[Default Value] pattern
|
|
217
217
|
[Must Match] (?i-mx:^(?:and|all|any|or|not|none|p(?:at(?:tern)?)?)$)
|
|
@@ -354,7 +354,7 @@ Adds @done tag without datestamp so no elapsed time is recorded.
|
|
|
354
354
|
===== Options
|
|
355
355
|
===== --bool BOOLEAN
|
|
356
356
|
|
|
357
|
-
Boolean used to combine multiple tags. Use PATTERN to parse + and - as booleans
|
|
357
|
+
Boolean used to combine multiple tags (AND|OR|NOT). Use PATTERN to parse + and - as booleans
|
|
358
358
|
|
|
359
359
|
[Default Value] pattern
|
|
360
360
|
[Must Match] (?i-mx:^(?:and|all|any|or|not|none|p(?:at(?:tern)?)?)$)
|
|
@@ -574,7 +574,7 @@ DEPRECATED
|
|
|
574
574
|
|
|
575
575
|
|
|
576
576
|
===== Commands
|
|
577
|
-
====== Command: <tt>edit </tt>
|
|
577
|
+
====== Command: <tt>edit|open </tt>
|
|
578
578
|
Open config file in editor
|
|
579
579
|
|
|
580
580
|
|
|
@@ -758,7 +758,7 @@ Backdate completed date to date string [4pm|20m|2h|yesterday noon]
|
|
|
758
758
|
|
|
759
759
|
===== --bool BOOLEAN
|
|
760
760
|
|
|
761
|
-
Boolean used to combine multiple tags. Use PATTERN to parse + and - as booleans
|
|
761
|
+
Boolean used to combine multiple tags (AND|OR|NOT). Use PATTERN to parse + and - as booleans
|
|
762
762
|
|
|
763
763
|
[Default Value] pattern
|
|
764
764
|
[Must Match] (?i-mx:^(?:and|all|any|or|not|none|p(?:at(?:tern)?)?)$)
|
|
@@ -893,7 +893,7 @@ Search entries older than date (natural language). If this is only a time (8am,
|
|
|
893
893
|
|
|
894
894
|
===== --bool BOOLEAN
|
|
895
895
|
|
|
896
|
-
Boolean used to combine multiple tags. Use PATTERN to parse + and - as booleans
|
|
896
|
+
Boolean used to combine multiple tags (AND|OR|NOT). Use PATTERN to parse + and - as booleans
|
|
897
897
|
|
|
898
898
|
[Default Value] pattern
|
|
899
899
|
[Must Match] (?i-mx:^(?:and|all|any|or|not|none|p(?:at(?:tern)?)?)$)
|
|
@@ -1161,7 +1161,7 @@ allowing `doing last` to target historical entries.
|
|
|
1161
1161
|
===== Options
|
|
1162
1162
|
===== --bool BOOLEAN
|
|
1163
1163
|
|
|
1164
|
-
Boolean used to combine multiple tags. Use PATTERN to parse + and - as booleans
|
|
1164
|
+
Boolean used to combine multiple tags (AND|OR|NOT). Use PATTERN to parse + and - as booleans
|
|
1165
1165
|
|
|
1166
1166
|
[Default Value] pattern
|
|
1167
1167
|
[Must Match] (?i-mx:^(?:and|all|any|or|not|none|p(?:at(?:tern)?)?)$)
|
|
@@ -1278,7 +1278,7 @@ Mark last entry as flagged
|
|
|
1278
1278
|
===== Options
|
|
1279
1279
|
===== --bool BOOLEAN
|
|
1280
1280
|
|
|
1281
|
-
Boolean used to combine multiple tags. Use PATTERN to parse + and - as booleans
|
|
1281
|
+
Boolean used to combine multiple tags (AND|OR|NOT). Use PATTERN to parse + and - as booleans
|
|
1282
1282
|
|
|
1283
1283
|
[Default Value] pattern
|
|
1284
1284
|
[Must Match] (?i-mx:^(?:and|all|any|or|not|none|p(?:at(?:tern)?)?)$)
|
|
@@ -1426,7 +1426,7 @@ If -r is provided with no other arguments, the last note is removed.
|
|
|
1426
1426
|
===== Options
|
|
1427
1427
|
===== --bool BOOLEAN
|
|
1428
1428
|
|
|
1429
|
-
Boolean used to combine multiple tags. Use PATTERN to parse + and - as booleans
|
|
1429
|
+
Boolean used to combine multiple tags (AND|OR|NOT). Use PATTERN to parse + and - as booleans
|
|
1430
1430
|
|
|
1431
1431
|
[Default Value] pattern
|
|
1432
1432
|
[Must Match] (?i-mx:^(?:and|all|any|or|not|none|p(?:at(?:tern)?)?)$)
|
|
@@ -1584,7 +1584,7 @@ View entries before specified time (e.g. 8am, 12:30pm, 15:00)
|
|
|
1584
1584
|
|
|
1585
1585
|
===== --bool BOOLEAN
|
|
1586
1586
|
|
|
1587
|
-
Boolean used to combine multiple tags. Use PATTERN to parse + and - as booleans
|
|
1587
|
+
Boolean used to combine multiple tags (AND|OR|NOT). Use PATTERN to parse + and - as booleans
|
|
1588
1588
|
|
|
1589
1589
|
[Default Value] pattern
|
|
1590
1590
|
[Must Match] (?i-mx:^(?:and|all|any|or|not|none|p(?:at(?:tern)?)?)$)
|
|
@@ -1881,7 +1881,7 @@ If a date string is provided as an argument, the start time will be set to the p
|
|
|
1881
1881
|
===== Options
|
|
1882
1882
|
===== --bool BOOLEAN
|
|
1883
1883
|
|
|
1884
|
-
Boolean used to combine multiple tags. Use PATTERN to parse + and - as booleans
|
|
1884
|
+
Boolean used to combine multiple tags (AND|OR|NOT). Use PATTERN to parse + and - as booleans
|
|
1885
1885
|
|
|
1886
1886
|
[Default Value] pattern
|
|
1887
1887
|
[Must Match] (?i-mx:^(?:and|all|any|or|not|none|p(?:at(?:tern)?)?)$)
|
|
@@ -1984,7 +1984,7 @@ Rotate entries older than date
|
|
|
1984
1984
|
|
|
1985
1985
|
===== --bool BOOLEAN
|
|
1986
1986
|
|
|
1987
|
-
Boolean used to combine multiple tags. Use PATTERN to parse + and - as booleans
|
|
1987
|
+
Boolean used to combine multiple tags (AND|OR|NOT). Use PATTERN to parse + and - as booleans
|
|
1988
1988
|
|
|
1989
1989
|
[Default Value] pattern
|
|
1990
1990
|
[Must Match] (?i-mx:^(?:and|all|any|or|not|none|p(?:at(?:tern)?)?)$)
|
|
@@ -2286,7 +2286,7 @@ Show entries older than date (natural language). If this is only a time (8am, 1:
|
|
|
2286
2286
|
|
|
2287
2287
|
===== --bool BOOLEAN
|
|
2288
2288
|
|
|
2289
|
-
Boolean used to combine multiple tags. Use PATTERN to parse + and - as booleans
|
|
2289
|
+
Boolean used to combine multiple tags (AND|OR|NOT). Use PATTERN to parse + and - as booleans
|
|
2290
2290
|
|
|
2291
2291
|
[Default Value] pattern
|
|
2292
2292
|
[Must Match] (?i-mx:^(?:and|all|any|or|not|none|p(?:at(?:tern)?)?)$)
|
|
@@ -2460,7 +2460,7 @@ and "2d" would be interpreted as "two days ago."
|
|
|
2460
2460
|
===== Options
|
|
2461
2461
|
===== --bool BOOLEAN
|
|
2462
2462
|
|
|
2463
|
-
Boolean used to combine multiple tags. Use PATTERN to parse + and - as booleans
|
|
2463
|
+
Boolean used to combine multiple tags (AND|OR|NOT). Use PATTERN to parse + and - as booleans
|
|
2464
2464
|
|
|
2465
2465
|
[Default Value] pattern
|
|
2466
2466
|
[Must Match] (?i-mx:^(?:and|all|any|or|not|none|p(?:at(?:tern)?)?)$)
|
|
@@ -2605,7 +2605,7 @@ Add (or remove) tags from the last entry, or from multiple entries
|
|
|
2605
2605
|
===== Options
|
|
2606
2606
|
===== --bool BOOLEAN
|
|
2607
2607
|
|
|
2608
|
-
Boolean used to combine multiple tags. Use PATTERN to parse + and - as booleans
|
|
2608
|
+
Boolean used to combine multiple tags (AND|OR|NOT). Use PATTERN to parse + and - as booleans
|
|
2609
2609
|
|
|
2610
2610
|
[Default Value] pattern
|
|
2611
2611
|
[Must Match] (?i-mx:^(?:and|all|any|or|not|none|p(?:at(?:tern)?)?)$)
|
|
@@ -2746,7 +2746,7 @@ List all tags in the current Doing file
|
|
|
2746
2746
|
===== Options
|
|
2747
2747
|
===== --bool BOOLEAN
|
|
2748
2748
|
|
|
2749
|
-
Boolean used to combine multiple tags. Use PATTERN to parse + and - as booleans
|
|
2749
|
+
Boolean used to combine multiple tags (AND|OR|NOT). Use PATTERN to parse + and - as booleans
|
|
2750
2750
|
|
|
2751
2751
|
[Default Value] pattern
|
|
2752
2752
|
[Must Match] (?i-mx:^(?:and|all|any|or|not|none|p(?:at(?:tern)?)?)$)
|
data/lib/doing/add_options.rb
CHANGED
|
@@ -147,7 +147,7 @@ def add_options(type, cmd, default_template: 'default')
|
|
|
147
147
|
cmd.desc "#{action} items that *don't* match search/tag filters"
|
|
148
148
|
cmd.switch [:not], default_value: false, negatable: false
|
|
149
149
|
|
|
150
|
-
cmd.desc 'Boolean used to combine multiple tags. Use PATTERN to parse + and - as booleans'
|
|
150
|
+
cmd.desc 'Boolean used to combine multiple tags (AND|OR|NOT). Use PATTERN to parse + and - as booleans'
|
|
151
151
|
cmd.arg_name 'BOOLEAN'
|
|
152
152
|
cmd.flag [:bool], must_match: REGEX_BOOL,
|
|
153
153
|
default_value: :pattern,
|
data/lib/doing/plugin_manager.rb
CHANGED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# title: Doing File Export
|
|
4
|
+
# description: Export Doing format data
|
|
5
|
+
# author: Brett Terpstra
|
|
6
|
+
# url: https://brettterpstra.com
|
|
7
|
+
module Doing
|
|
8
|
+
class DoingExport
|
|
9
|
+
include Doing::Util
|
|
10
|
+
|
|
11
|
+
def self.settings
|
|
12
|
+
{
|
|
13
|
+
trigger: 'doing'
|
|
14
|
+
}
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def self.render(wwid, items, variables: {})
|
|
18
|
+
return if items.nil?
|
|
19
|
+
|
|
20
|
+
content = Doing::Items.new
|
|
21
|
+
items.each do |item|
|
|
22
|
+
content.add_section(item.section, log: false)
|
|
23
|
+
content.push(item)
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
out = []
|
|
27
|
+
content.sections.each do |section|
|
|
28
|
+
out.push(section.original)
|
|
29
|
+
is = content.in_section(section.title).sort_by { |i| [i.date, i.title] }
|
|
30
|
+
is.reverse! if Doing.setting('doing_file_sort').normalize_order == :desc
|
|
31
|
+
is.each { |item| out.push(item.to_s) }
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
Doing::Pager.page out.join("\n")
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
Doing::Plugins.register 'doing', :export, self
|
|
38
|
+
end
|
|
39
|
+
end
|
|
@@ -12,7 +12,7 @@ module Doing
|
|
|
12
12
|
|
|
13
13
|
def self.settings
|
|
14
14
|
{
|
|
15
|
-
trigger: 'template
|
|
15
|
+
trigger: 'template'
|
|
16
16
|
}
|
|
17
17
|
end
|
|
18
18
|
|
|
@@ -50,6 +50,8 @@ module Doing
|
|
|
50
50
|
note = []
|
|
51
51
|
end
|
|
52
52
|
|
|
53
|
+
placeholders['id'] = item.id
|
|
54
|
+
|
|
53
55
|
placeholders['tags'] = item.tags
|
|
54
56
|
|
|
55
57
|
placeholders['date'] = item.date.strftime(opt[:format])
|
|
@@ -141,6 +143,6 @@ module Doing
|
|
|
141
143
|
out
|
|
142
144
|
end
|
|
143
145
|
|
|
144
|
-
Doing::Plugins.register
|
|
146
|
+
Doing::Plugins.register 'template', :export, self
|
|
145
147
|
end
|
|
146
148
|
end
|
|
@@ -29,6 +29,7 @@ module Doing
|
|
|
29
29
|
exit_now! 'File not found' unless File.exist?(File.expand_path(path))
|
|
30
30
|
|
|
31
31
|
options[:no_overlap] ||= false
|
|
32
|
+
|
|
32
33
|
options[:autotag] ||= Doing.auto_tag
|
|
33
34
|
|
|
34
35
|
tags = options[:tag] ? options[:tag].split(/[ ,]+/).map { |t| t.sub(/^@?/, '') } : []
|
|
@@ -47,6 +48,7 @@ module Doing
|
|
|
47
48
|
Doing.logger.debug('Skipped:', %(#{skipped} items that didn't match filter criteria)) if skipped.positive?
|
|
48
49
|
|
|
49
50
|
imported = []
|
|
51
|
+
updated = 0
|
|
50
52
|
|
|
51
53
|
new_items.each do |item|
|
|
52
54
|
next if duplicate?(item)
|
|
@@ -65,8 +67,7 @@ module Doing
|
|
|
65
67
|
section = options[:section] || item.section
|
|
66
68
|
section ||= Doing.setting('current_section')
|
|
67
69
|
|
|
68
|
-
new_item = Item.new(item.date, title, section)
|
|
69
|
-
new_item.note = item.note
|
|
70
|
+
new_item = Item.new(item.date, title, section, item.note, item.id)
|
|
70
71
|
|
|
71
72
|
is_match = true
|
|
72
73
|
|
|
@@ -79,13 +80,21 @@ module Doing
|
|
|
79
80
|
is_match = options[:not] ? !is_match : is_match
|
|
80
81
|
end
|
|
81
82
|
|
|
82
|
-
|
|
83
|
+
if wwid.content.find_id(new_item.id)
|
|
84
|
+
old_index = wwid.content.index_for_id(new_item.id)
|
|
85
|
+
old_item = wwid.content[old_index].clone
|
|
86
|
+
wwid.content[old_index] = new_item
|
|
87
|
+
Hooks.trigger :post_entry_updated, self, new_item, old_item
|
|
88
|
+
updated += 1
|
|
89
|
+
else
|
|
90
|
+
imported.push(new_item) if is_match
|
|
91
|
+
end
|
|
83
92
|
end
|
|
84
93
|
|
|
85
94
|
dups = new_items.count - imported.count
|
|
86
95
|
Doing.logger.info('Skipped:', %(#{dups} duplicate items)) if dups.positive?
|
|
87
96
|
|
|
88
|
-
imported = wwid.dedup(imported, no_overlap:
|
|
97
|
+
imported = wwid.dedup(imported, no_overlap: options[:no_overlap])
|
|
89
98
|
overlaps = new_items.count - imported.count - dups
|
|
90
99
|
Doing.logger.debug('Skipped:', "#{overlaps} items with overlapping times") if overlaps.positive?
|
|
91
100
|
|
|
@@ -96,6 +105,7 @@ module Doing
|
|
|
96
105
|
Hooks.trigger :post_entry_added, self, item
|
|
97
106
|
end
|
|
98
107
|
|
|
108
|
+
Doing.logger.info('Updated:', %(#{updated} items))
|
|
99
109
|
Doing.logger.info('Imported:', "#{imported.count} items")
|
|
100
110
|
end
|
|
101
111
|
|
|
@@ -128,10 +138,11 @@ module Doing
|
|
|
128
138
|
when /^(\S[\S ]+):(\s+@[\w\-_.]+(?= |$))*\s*$/
|
|
129
139
|
section = Regexp.last_match(1)
|
|
130
140
|
current = 0
|
|
131
|
-
when /^\s*- (\d{4}-\d\d-\d\d \d\d:\d\d) \| (
|
|
141
|
+
when /^\s*- (\d{4}-\d\d-\d\d \d\d:\d\d) \| (.*?)(?: <([a-z0-9]{32})>)? *$/
|
|
132
142
|
date = Regexp.last_match(1).strip
|
|
133
143
|
title = Regexp.last_match(2).strip
|
|
134
|
-
|
|
144
|
+
id = Regexp.last_match(3)
|
|
145
|
+
item = Item.new(date, title, section, nil, id)
|
|
135
146
|
items.push(item)
|
|
136
147
|
current += 1
|
|
137
148
|
when /^\S/
|
data/lib/doing/version.rb
CHANGED
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.47
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Brett Terpstra
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-03-
|
|
11
|
+
date: 2022-03-26 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: github-markup
|
|
@@ -533,6 +533,7 @@ files:
|
|
|
533
533
|
- docs/doc/Doing/ItemTags.html
|
|
534
534
|
- docs/doc/Doing/Items.html
|
|
535
535
|
- docs/doc/Doing/JSONExport.html
|
|
536
|
+
- docs/doc/Doing/JSONImport.html
|
|
536
537
|
- docs/doc/Doing/LogAdapter.html
|
|
537
538
|
- docs/doc/Doing/Logger.html
|
|
538
539
|
- docs/doc/Doing/MarkdownExport.html
|
|
@@ -669,6 +670,7 @@ files:
|
|
|
669
670
|
- lib/doing/plugin_manager.rb
|
|
670
671
|
- lib/doing/plugins/export/csv_export.rb
|
|
671
672
|
- lib/doing/plugins/export/dayone_export.rb
|
|
673
|
+
- lib/doing/plugins/export/doing_export.rb
|
|
672
674
|
- lib/doing/plugins/export/html_export.rb
|
|
673
675
|
- lib/doing/plugins/export/json_export.rb
|
|
674
676
|
- lib/doing/plugins/export/markdown_export.rb
|