doing 2.1.12 → 2.1.16
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 +16 -14
- data/.yardoc/object_types +0 -0
- data/.yardoc/objects/root.dat +0 -0
- data/CHANGELOG.md +67 -0
- data/Gemfile.lock +9 -2
- data/README.md +56 -19
- data/bin/doing +317 -113
- 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 +7 -4
- 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 +337 -14
- data/docs/doc/Doing/Items.html +66 -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 +103 -1
- data/docs/doc/Doing/Section.html +1 -1
- data/docs/doc/Doing/TemplateString.html +2 -2
- data/docs/doc/Doing/Util/Backup.html +84 -1
- data/docs/doc/Doing/Util.html +1 -1
- data/docs/doc/Doing/WWID.html +214 -35
- 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 +881 -138
- 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 +408 -256
- data/docs/doc/top-level-namespace.html +2 -2
- data/docs/index.md +56 -19
- data/doing.gemspec +2 -0
- data/doing.rdoc +257 -48
- data/example_plugin.rb +2 -4
- data/lib/completion/_doing.zsh +31 -27
- data/lib/completion/doing.bash +50 -39
- data/lib/completion/doing.fish +37 -7
- data/lib/doing/array_chronify.rb +57 -0
- data/lib/doing/configuration.rb +4 -1
- data/lib/doing/item.rb +176 -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/plugins/import/calendar_import.rb +13 -1
- data/lib/doing/plugins/import/doing_import.rb +12 -1
- data/lib/doing/plugins/import/timing_import.rb +13 -1
- data/lib/doing/prompt.rb +54 -1
- data/lib/doing/string.rb +97 -33
- data/lib/doing/string_chronify.rb +112 -14
- data/lib/doing/template_string.rb +1 -1
- data/lib/doing/time.rb +6 -6
- data/lib/doing/util_backup.rb +1 -1
- data/lib/doing/version.rb +1 -1
- data/lib/doing/wwid.rb +128 -103
- data/lib/doing.rb +36 -31
- data/lib/examples/plugins/say_export.rb +1 -4
- metadata +46 -2
data/lib/doing.rb
CHANGED
@@ -9,42 +9,47 @@ require 'csv'
|
|
9
9
|
require 'tempfile'
|
10
10
|
require 'zlib'
|
11
11
|
require 'base64'
|
12
|
-
|
13
|
-
require 'chronic'
|
14
|
-
require 'tty-link'
|
15
|
-
require 'tty-which'
|
16
|
-
require 'tty-markdown'
|
17
12
|
require 'plist'
|
18
|
-
|
13
|
+
require 'readline'
|
19
14
|
require 'haml'
|
20
15
|
require 'json'
|
21
16
|
require 'logger'
|
22
17
|
require 'safe_yaml/load'
|
23
|
-
|
24
|
-
require '
|
25
|
-
require '
|
26
|
-
require '
|
27
|
-
require '
|
28
|
-
require '
|
29
|
-
require '
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
18
|
+
|
19
|
+
require 'chronic'
|
20
|
+
require 'tty-link'
|
21
|
+
require 'tty-which'
|
22
|
+
require 'tty-markdown'
|
23
|
+
require 'tty-reader'
|
24
|
+
require 'tty-screen'
|
25
|
+
|
26
|
+
require_relative 'doing/hash'
|
27
|
+
require_relative 'doing/colors'
|
28
|
+
require_relative 'doing/template_string'
|
29
|
+
require_relative 'doing/string'
|
30
|
+
require_relative 'doing/time'
|
31
|
+
require_relative 'doing/array'
|
32
|
+
require_relative 'doing/symbol'
|
33
|
+
require_relative 'doing/util'
|
34
|
+
require_relative 'doing/util_backup'
|
35
|
+
require_relative 'doing/configuration'
|
36
|
+
require_relative 'doing/section'
|
37
|
+
require_relative 'doing/items'
|
38
|
+
require_relative 'doing/note'
|
39
|
+
require_relative 'doing/item'
|
40
|
+
require_relative 'doing/wwid'
|
41
|
+
require_relative 'doing/log_adapter'
|
42
|
+
require_relative 'doing/prompt'
|
43
|
+
require_relative 'doing/errors'
|
44
|
+
require_relative 'doing/hooks'
|
45
|
+
require_relative 'doing/plugin_manager'
|
46
|
+
require_relative 'doing/pager'
|
47
|
+
require_relative 'doing/completion'
|
48
|
+
require_relative 'doing/boolean_term_parser'
|
49
|
+
require_relative 'doing/phrase_parser'
|
50
|
+
require_relative 'doing/array_chronify'
|
51
|
+
require_relative 'doing/numeric_chronify'
|
52
|
+
require_relative 'doing/string_chronify'
|
48
53
|
# require 'doing/markdown_document_listener'
|
49
54
|
|
50
55
|
# 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.16
|
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-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: safe_yaml
|
@@ -346,6 +346,46 @@ dependencies:
|
|
346
346
|
- - ">="
|
347
347
|
- !ruby/object:Gem::Version
|
348
348
|
version: 0.7.0
|
349
|
+
- !ruby/object:Gem::Dependency
|
350
|
+
name: tty-reader
|
351
|
+
requirement: !ruby/object:Gem::Requirement
|
352
|
+
requirements:
|
353
|
+
- - "~>"
|
354
|
+
- !ruby/object:Gem::Version
|
355
|
+
version: '0.9'
|
356
|
+
- - ">="
|
357
|
+
- !ruby/object:Gem::Version
|
358
|
+
version: 0.9.0
|
359
|
+
type: :runtime
|
360
|
+
prerelease: false
|
361
|
+
version_requirements: !ruby/object:Gem::Requirement
|
362
|
+
requirements:
|
363
|
+
- - "~>"
|
364
|
+
- !ruby/object:Gem::Version
|
365
|
+
version: '0.9'
|
366
|
+
- - ">="
|
367
|
+
- !ruby/object:Gem::Version
|
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
|
349
389
|
- !ruby/object:Gem::Dependency
|
350
390
|
name: parslet
|
351
391
|
requirement: !ruby/object:Gem::Requirement
|
@@ -396,6 +436,7 @@ extensions: []
|
|
396
436
|
extra_rdoc_files:
|
397
437
|
- README.md
|
398
438
|
files:
|
439
|
+
- ".irbrc"
|
399
440
|
- ".yardoc/checksums"
|
400
441
|
- ".yardoc/complete"
|
401
442
|
- ".yardoc/object_types"
|
@@ -457,6 +498,7 @@ files:
|
|
457
498
|
- docs/doc/GLI/Commands.html
|
458
499
|
- docs/doc/GLI/Commands/MarkdownDocumentListener.html
|
459
500
|
- docs/doc/Hash.html
|
501
|
+
- docs/doc/Numeric.html
|
460
502
|
- docs/doc/PhraseParser.html
|
461
503
|
- docs/doc/PhraseParser/Operator.html
|
462
504
|
- docs/doc/PhraseParser/PhraseClause.html
|
@@ -495,6 +537,7 @@ files:
|
|
495
537
|
- lib/completion/doing.fish
|
496
538
|
- lib/doing.rb
|
497
539
|
- lib/doing/array.rb
|
540
|
+
- lib/doing/array_chronify.rb
|
498
541
|
- lib/doing/boolean_term_parser.rb
|
499
542
|
- lib/doing/cli_status.rb
|
500
543
|
- lib/doing/colors.rb
|
@@ -512,6 +555,7 @@ files:
|
|
512
555
|
- lib/doing/log_adapter.rb
|
513
556
|
- lib/doing/markdown_document_listener.rb
|
514
557
|
- lib/doing/note.rb
|
558
|
+
- lib/doing/numeric_chronify.rb
|
515
559
|
- lib/doing/pager.rb
|
516
560
|
- lib/doing/phrase_parser.rb
|
517
561
|
- lib/doing/plugin_manager.rb
|