doing 2.1.14 → 2.1.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.irbrc +1 -0
- data/.yardoc/checksums +11 -9
- data/.yardoc/object_types +0 -0
- data/.yardoc/objects/root.dat +0 -0
- data/CHANGELOG.md +18 -0
- data/Gemfile.lock +3 -2
- data/README.md +56 -19
- data/bin/doing +4 -3
- data/docs/doc/Array.html +117 -3
- 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/Color.html +1 -1
- data/docs/doc/Doing/Completion.html +1 -1
- data/docs/doc/Doing/Configuration.html +5 -2
- 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/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/Hooks.html +1 -1
- data/docs/doc/Doing/Item.html +106 -2
- data/docs/doc/Doing/Items.html +2 -2
- data/docs/doc/Doing/LogAdapter.html +1 -1
- data/docs/doc/Doing/Note.html +2 -2
- 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/Section.html +1 -1
- data/docs/doc/Doing/TemplateString.html +2 -2
- data/docs/doc/Doing/Util/Backup.html +1 -1
- data/docs/doc/Doing/Util.html +1 -1
- data/docs/doc/Doing/WWID.html +35 -65
- data/docs/doc/Doing.html +3 -3
- 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 +279 -0
- 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 +767 -115
- data/docs/doc/Symbol.html +1 -1
- data/docs/doc/Time.html +1 -1
- data/docs/doc/_index.html +14 -9
- data/docs/doc/class_list.html +1 -1
- data/docs/doc/file.README.html +41 -15
- data/docs/doc/index.html +41 -15
- data/docs/doc/method_list.html +357 -293
- data/docs/doc/top-level-namespace.html +2 -2
- data/docs/index.md +56 -19
- data/doing.gemspec +1 -0
- data/doing.rdoc +3 -3
- data/example_plugin.rb +2 -4
- data/lib/completion/_doing.zsh +3 -3
- data/lib/completion/doing.bash +4 -4
- data/lib/completion/doing.fish +2 -2
- data/lib/doing/array_chronify.rb +57 -0
- data/lib/doing/configuration.rb +4 -1
- data/lib/doing/item.rb +32 -0
- data/lib/doing/log_adapter.rb +1 -1
- data/lib/doing/numeric_chronify.rb +40 -0
- data/lib/doing/plugins/export/dayone_export.rb +1 -1
- data/lib/doing/plugins/export/json_export.rb +2 -2
- data/lib/doing/plugins/export/template_export.rb +47 -90
- data/lib/doing/string.rb +97 -33
- data/lib/doing/string_chronify.rb +83 -13
- data/lib/doing/time.rb +4 -4
- data/lib/doing/util_backup.rb +1 -1
- data/lib/doing/version.rb +1 -1
- data/lib/doing/wwid.rb +58 -83
- data/lib/doing.rb +30 -27
- data/lib/examples/plugins/say_export.rb +1 -4
- metadata +26 -2
data/lib/doing.rb
CHANGED
@@ -9,43 +9,46 @@ require 'csv'
|
|
9
9
|
require 'tempfile'
|
10
10
|
require 'zlib'
|
11
11
|
require 'base64'
|
12
|
+
require 'plist'
|
12
13
|
|
13
14
|
require 'chronic'
|
14
15
|
require 'tty-link'
|
15
16
|
require 'tty-which'
|
16
17
|
require 'tty-markdown'
|
17
18
|
require 'tty-reader'
|
18
|
-
require '
|
19
|
-
# require 'amatch'
|
19
|
+
require 'tty-screen'
|
20
20
|
require 'haml'
|
21
21
|
require 'json'
|
22
22
|
require 'logger'
|
23
23
|
require 'safe_yaml/load'
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
24
|
+
|
25
|
+
require_relative 'doing/hash'
|
26
|
+
require_relative 'doing/colors'
|
27
|
+
require_relative 'doing/template_string'
|
28
|
+
require_relative 'doing/string'
|
29
|
+
require_relative 'doing/time'
|
30
|
+
require_relative 'doing/array'
|
31
|
+
require_relative 'doing/symbol'
|
32
|
+
require_relative 'doing/util'
|
33
|
+
require_relative 'doing/util_backup'
|
34
|
+
require_relative 'doing/configuration'
|
35
|
+
require_relative 'doing/section'
|
36
|
+
require_relative 'doing/items'
|
37
|
+
require_relative 'doing/note'
|
38
|
+
require_relative 'doing/item'
|
39
|
+
require_relative 'doing/wwid'
|
40
|
+
require_relative 'doing/log_adapter'
|
41
|
+
require_relative 'doing/prompt'
|
42
|
+
require_relative 'doing/errors'
|
43
|
+
require_relative 'doing/hooks'
|
44
|
+
require_relative 'doing/plugin_manager'
|
45
|
+
require_relative 'doing/pager'
|
46
|
+
require_relative 'doing/completion'
|
47
|
+
require_relative 'doing/boolean_term_parser'
|
48
|
+
require_relative 'doing/phrase_parser'
|
49
|
+
require_relative 'doing/array_chronify'
|
50
|
+
require_relative 'doing/numeric_chronify'
|
51
|
+
require_relative 'doing/string_chronify'
|
49
52
|
# require 'doing/markdown_document_listener'
|
50
53
|
|
51
54
|
# Main doing module
|
@@ -149,11 +149,8 @@ module Doing
|
|
149
149
|
finished_at = i.end_date
|
150
150
|
took += finished_at.strftime('%A %B %e at %I:%M%p')
|
151
151
|
|
152
|
-
d, h, m = wwid.format_time(interval)
|
153
152
|
took += ' and it took'
|
154
|
-
took +=
|
155
|
-
took += " #{h.to_i} hours" if h.to_i.positive?
|
156
|
-
took += " #{m.to_i} minutes" if m.to_i.positive?
|
153
|
+
took += interval.time_string(format: :natural)
|
157
154
|
end
|
158
155
|
end
|
159
156
|
|
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.15
|
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-01-
|
11
|
+
date: 2022-01-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: safe_yaml
|
@@ -366,6 +366,26 @@ dependencies:
|
|
366
366
|
- - ">="
|
367
367
|
- !ruby/object:Gem::Version
|
368
368
|
version: 0.9.0
|
369
|
+
- !ruby/object:Gem::Dependency
|
370
|
+
name: tty-screen
|
371
|
+
requirement: !ruby/object:Gem::Requirement
|
372
|
+
requirements:
|
373
|
+
- - "~>"
|
374
|
+
- !ruby/object:Gem::Version
|
375
|
+
version: '0.8'
|
376
|
+
- - ">="
|
377
|
+
- !ruby/object:Gem::Version
|
378
|
+
version: 0.8.1
|
379
|
+
type: :runtime
|
380
|
+
prerelease: false
|
381
|
+
version_requirements: !ruby/object:Gem::Requirement
|
382
|
+
requirements:
|
383
|
+
- - "~>"
|
384
|
+
- !ruby/object:Gem::Version
|
385
|
+
version: '0.8'
|
386
|
+
- - ">="
|
387
|
+
- !ruby/object:Gem::Version
|
388
|
+
version: 0.8.1
|
369
389
|
- !ruby/object:Gem::Dependency
|
370
390
|
name: parslet
|
371
391
|
requirement: !ruby/object:Gem::Requirement
|
@@ -416,6 +436,7 @@ extensions: []
|
|
416
436
|
extra_rdoc_files:
|
417
437
|
- README.md
|
418
438
|
files:
|
439
|
+
- ".irbrc"
|
419
440
|
- ".yardoc/checksums"
|
420
441
|
- ".yardoc/complete"
|
421
442
|
- ".yardoc/object_types"
|
@@ -477,6 +498,7 @@ files:
|
|
477
498
|
- docs/doc/GLI/Commands.html
|
478
499
|
- docs/doc/GLI/Commands/MarkdownDocumentListener.html
|
479
500
|
- docs/doc/Hash.html
|
501
|
+
- docs/doc/Numeric.html
|
480
502
|
- docs/doc/PhraseParser.html
|
481
503
|
- docs/doc/PhraseParser/Operator.html
|
482
504
|
- docs/doc/PhraseParser/PhraseClause.html
|
@@ -515,6 +537,7 @@ files:
|
|
515
537
|
- lib/completion/doing.fish
|
516
538
|
- lib/doing.rb
|
517
539
|
- lib/doing/array.rb
|
540
|
+
- lib/doing/array_chronify.rb
|
518
541
|
- lib/doing/boolean_term_parser.rb
|
519
542
|
- lib/doing/cli_status.rb
|
520
543
|
- lib/doing/colors.rb
|
@@ -532,6 +555,7 @@ files:
|
|
532
555
|
- lib/doing/log_adapter.rb
|
533
556
|
- lib/doing/markdown_document_listener.rb
|
534
557
|
- lib/doing/note.rb
|
558
|
+
- lib/doing/numeric_chronify.rb
|
535
559
|
- lib/doing/pager.rb
|
536
560
|
- lib/doing/phrase_parser.rb
|
537
561
|
- lib/doing/plugin_manager.rb
|