doing 1.0.27 → 1.0.33
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/README.md +3 -0
- data/bin/doing +11 -5
- data/lib/doing/version.rb +1 -1
- data/lib/doing/wwid.rb +25 -16
- metadata +24 -30
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 381d875c7e4b8f3782e081c3a4bd6f0551c420b02d7dad20be8e2217b2dc4d59
|
4
|
+
data.tar.gz: dae9efcc7453831ff1c33e1d03a61986fed1540d33b0eb3a9990522b5e4452f1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6420c68b41773a9d3c54a0185c26fd972df2f69ad11cd17bd30d5c83789ed5b405172170a30e8f483c6cd164ac13e6c851a583dfbf0e3ec9bfd273606849ca71
|
7
|
+
data.tar.gz: eb0f1d56e64e731f341879840ca592d3c55402e3e6f2467567cb7f513811a172ac3d605f3358c75f75d0ed5d28126a50ffdfba1165510b5073745ccdf8c1948d
|
data/README.md
CHANGED
@@ -54,6 +54,8 @@ When using the `now` and `later` commands on the command line, you can start the
|
|
54
54
|
|
55
55
|
Notes can be prevented from ever appearing in output with the global option `--no-notes`: `doing --no-notes show all`.
|
56
56
|
|
57
|
+
Auto tagging (adding tags listed in .doingrc under `autotag` and `default_tags`) can be skipped for an entry with the `-x` global option: `doing -x done skipping some automatic tagging`.
|
58
|
+
|
57
59
|
## Configuration
|
58
60
|
|
59
61
|
A basic configuration looks like this:
|
@@ -382,6 +384,7 @@ Note that you can include a tag with synonyms in the whitelist as well to tag it
|
|
382
384
|
--[no-]notes - Output notes if included in the template (default: enabled)
|
383
385
|
--stdout - Send results report to STDOUT instead of STDERR
|
384
386
|
--version - Display the program version
|
387
|
+
-x, --[no-]noauto - Exclude auto tags and default tags
|
385
388
|
|
386
389
|
### Commands:
|
387
390
|
|
data/bin/doing
CHANGED
@@ -43,10 +43,14 @@ desc 'Send results report to STDOUT instead of STDERR'
|
|
43
43
|
default_value false
|
44
44
|
switch [:stdout], :default_value => false, :negatable => false
|
45
45
|
|
46
|
+
desc 'Exclude auto tags and default tags'
|
47
|
+
switch [:x,:noauto], :default_value => false
|
48
|
+
|
46
49
|
desc 'Use a specific configuration file'
|
47
50
|
default_value false
|
48
51
|
flag [:config_file]
|
49
52
|
|
53
|
+
|
50
54
|
# desc 'Wrap notes at X chars (0 for no wrap)'
|
51
55
|
# flag [:w,:wrapwidth], :must_match => /^\d+$/, :type => Integer
|
52
56
|
|
@@ -488,23 +492,23 @@ desc 'Tag last entry'
|
|
488
492
|
arg_name 'tag1 [tag2...]'
|
489
493
|
command :tag do |c|
|
490
494
|
c.desc 'Section'
|
491
|
-
c.flag [:s
|
495
|
+
c.flag [:s, :section], :default_value => "All"
|
492
496
|
|
493
497
|
c.desc 'How many recent entries to tag (0 for all)'
|
494
498
|
c.default_value 1
|
495
|
-
c.flag [:c
|
499
|
+
c.flag [:c, :count], :default_value => 1
|
496
500
|
|
497
501
|
c.desc 'Include current date/time with tag'
|
498
502
|
c.default_value false
|
499
|
-
c.switch [:d
|
503
|
+
c.switch [:d, :date], :negatable => false, :default_value => false
|
500
504
|
|
501
505
|
c.desc 'Remove given tag(s)'
|
502
506
|
c.default_value false
|
503
|
-
c.switch [:r
|
507
|
+
c.switch [:r, :remove], :negatable => false, :default_value => false
|
504
508
|
|
505
509
|
c.desc 'Autotag entries based on autotag configuration in ~/.doingrc'
|
506
510
|
c.default_value false
|
507
|
-
c.switch [:a
|
511
|
+
c.switch [:a, :autotag], :negatable => false, :default_value => false
|
508
512
|
|
509
513
|
c.action do |global_options,options,args|
|
510
514
|
if args.length == 0 && !options[:a]
|
@@ -1128,6 +1132,8 @@ pre do |global,command,options,args|
|
|
1128
1132
|
wwid.init_doing_file
|
1129
1133
|
end
|
1130
1134
|
|
1135
|
+
wwid.auto_tag = !global[:noauto]
|
1136
|
+
|
1131
1137
|
wwid.config[:include_notes] = false unless global[:notes]
|
1132
1138
|
|
1133
1139
|
if global[:version]
|
data/lib/doing/version.rb
CHANGED
data/lib/doing/wwid.rb
CHANGED
@@ -42,7 +42,7 @@ end
|
|
42
42
|
## @brief Main "What Was I Doing" methods
|
43
43
|
##
|
44
44
|
class WWID
|
45
|
-
attr_accessor :content, :sections, :current_section, :doing_file, :config, :user_home, :default_config_file, :config_file, :results
|
45
|
+
attr_accessor :content, :sections, :current_section, :doing_file, :config, :user_home, :default_config_file, :config_file, :results, :auto_tag
|
46
46
|
|
47
47
|
##
|
48
48
|
## @brief Initializes the object.
|
@@ -53,6 +53,7 @@ class WWID
|
|
53
53
|
@default_config_file = '.doingrc'
|
54
54
|
@interval_cache = {}
|
55
55
|
@results = []
|
56
|
+
@auto_tag = true
|
56
57
|
end
|
57
58
|
|
58
59
|
##
|
@@ -200,13 +201,15 @@ class WWID
|
|
200
201
|
# end
|
201
202
|
# end
|
202
203
|
|
203
|
-
File.
|
204
|
+
unless File.exists?(@config_file)
|
205
|
+
File.open(@config_file, 'w') { |yf| YAML::dump(@config, yf) }
|
206
|
+
end
|
204
207
|
|
205
208
|
@config = @local_config.deep_merge(@config)
|
206
209
|
|
207
210
|
@current_section = @config['current_section']
|
208
211
|
@default_template = @config['templates']['default']['template']
|
209
|
-
@default_date_format = @config['templates']['default']['date_format']
|
212
|
+
@default_date_format = @config['templates']['default']['date_format'];
|
210
213
|
|
211
214
|
|
212
215
|
end
|
@@ -579,21 +582,26 @@ class WWID
|
|
579
582
|
opt[:timed] ||= false
|
580
583
|
|
581
584
|
title = [title.strip.cap_first]
|
582
|
-
title =
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
585
|
+
title = title.join(' ')
|
586
|
+
|
587
|
+
if @auto_tag
|
588
|
+
title = autotag(title)
|
589
|
+
unless @config['default_tags'].empty?
|
590
|
+
title += @config['default_tags'].map{|t|
|
591
|
+
unless t.nil?
|
592
|
+
dt = t.sub(/^ *@/,'').chomp
|
593
|
+
if title =~ /@#{dt}/
|
594
|
+
""
|
595
|
+
else
|
596
|
+
' @' + dt
|
597
|
+
end
|
591
598
|
end
|
592
|
-
|
593
|
-
|
599
|
+
}.delete_if {|t| t == "" }.join(" ")
|
600
|
+
end
|
594
601
|
end
|
602
|
+
title.gsub!(/ +/,' ')
|
595
603
|
entry = {'title' => title.strip, 'date' => opt[:back]}
|
596
|
-
unless opt[:note]
|
604
|
+
unless opt[:note].join('').strip == ''
|
597
605
|
entry['note'] = opt[:note].map {|n| n.gsub(/ *$/,'')}
|
598
606
|
end
|
599
607
|
items = @content[section]['items']
|
@@ -729,7 +737,7 @@ class WWID
|
|
729
737
|
}
|
730
738
|
item['title'] = title
|
731
739
|
else
|
732
|
-
new_title = autotag(item['title'])
|
740
|
+
new_title = autotag(item['title']) if @auto_tag
|
733
741
|
unless new_title == item['title']
|
734
742
|
@results.push("Tags updated: #{new_title}")
|
735
743
|
item['title'] = new_title
|
@@ -1665,6 +1673,7 @@ EOS
|
|
1665
1673
|
#
|
1666
1674
|
def autotag(text)
|
1667
1675
|
return unless text
|
1676
|
+
return text unless @auto_tag
|
1668
1677
|
current_tags = text.scan(/@\w+/)
|
1669
1678
|
whitelisted = []
|
1670
1679
|
@config['autotag']['whitelist'].each {|tag|
|
metadata
CHANGED
@@ -1,63 +1,57 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: doing
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.33
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brett Terpstra
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-07-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 13.0.1
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 13.0.1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rdoc
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
34
|
-
- - ">="
|
35
|
-
- !ruby/object:Gem::Version
|
36
|
-
version: 4.1.1
|
33
|
+
version: 6.2.1
|
37
34
|
type: :development
|
38
35
|
prerelease: false
|
39
36
|
version_requirements: !ruby/object:Gem::Requirement
|
40
37
|
requirements:
|
41
38
|
- - "~>"
|
42
39
|
- !ruby/object:Gem::Version
|
43
|
-
version:
|
44
|
-
- - ">="
|
45
|
-
- !ruby/object:Gem::Version
|
46
|
-
version: 4.1.1
|
40
|
+
version: 6.2.1
|
47
41
|
- !ruby/object:Gem::Dependency
|
48
42
|
name: aruba
|
49
43
|
requirement: !ruby/object:Gem::Requirement
|
50
44
|
requirements:
|
51
45
|
- - "~>"
|
52
46
|
- !ruby/object:Gem::Version
|
53
|
-
version:
|
47
|
+
version: 1.0.2
|
54
48
|
type: :development
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
51
|
requirements:
|
58
52
|
- - "~>"
|
59
53
|
- !ruby/object:Gem::Version
|
60
|
-
version:
|
54
|
+
version: 1.0.2
|
61
55
|
- !ruby/object:Gem::Dependency
|
62
56
|
name: test-unit
|
63
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -78,40 +72,40 @@ dependencies:
|
|
78
72
|
requirements:
|
79
73
|
- - "~>"
|
80
74
|
- !ruby/object:Gem::Version
|
81
|
-
version: '2.
|
75
|
+
version: '2.19'
|
82
76
|
- - ">="
|
83
77
|
- !ruby/object:Gem::Version
|
84
|
-
version: 2.
|
78
|
+
version: 2.19.2
|
85
79
|
type: :runtime
|
86
80
|
prerelease: false
|
87
81
|
version_requirements: !ruby/object:Gem::Requirement
|
88
82
|
requirements:
|
89
83
|
- - "~>"
|
90
84
|
- !ruby/object:Gem::Version
|
91
|
-
version: '2.
|
85
|
+
version: '2.19'
|
92
86
|
- - ">="
|
93
87
|
- !ruby/object:Gem::Version
|
94
|
-
version: 2.
|
88
|
+
version: 2.19.2
|
95
89
|
- !ruby/object:Gem::Dependency
|
96
90
|
name: haml
|
97
91
|
requirement: !ruby/object:Gem::Requirement
|
98
92
|
requirements:
|
99
93
|
- - ">="
|
100
94
|
- !ruby/object:Gem::Version
|
101
|
-
version: 5.
|
95
|
+
version: 5.1.2
|
102
96
|
- - "~>"
|
103
97
|
- !ruby/object:Gem::Version
|
104
|
-
version: 5.
|
98
|
+
version: 5.1.2
|
105
99
|
type: :runtime
|
106
100
|
prerelease: false
|
107
101
|
version_requirements: !ruby/object:Gem::Requirement
|
108
102
|
requirements:
|
109
103
|
- - ">="
|
110
104
|
- !ruby/object:Gem::Version
|
111
|
-
version: 5.
|
105
|
+
version: 5.1.2
|
112
106
|
- - "~>"
|
113
107
|
- !ruby/object:Gem::Version
|
114
|
-
version: 5.
|
108
|
+
version: 5.1.2
|
115
109
|
- !ruby/object:Gem::Dependency
|
116
110
|
name: chronic
|
117
111
|
requirement: !ruby/object:Gem::Requirement
|
@@ -161,7 +155,7 @@ dependencies:
|
|
161
155
|
version: 1.8.1
|
162
156
|
- - "~>"
|
163
157
|
- !ruby/object:Gem::Version
|
164
|
-
version: 2.
|
158
|
+
version: 2.3.1
|
165
159
|
type: :runtime
|
166
160
|
prerelease: false
|
167
161
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -171,7 +165,7 @@ dependencies:
|
|
171
165
|
version: 1.8.1
|
172
166
|
- - "~>"
|
173
167
|
- !ruby/object:Gem::Version
|
174
|
-
version: 2.
|
168
|
+
version: 2.3.1
|
175
169
|
description: A tool for managing a TaskPaper-like file of recent activites. Perfect
|
176
170
|
for the late-night hacker on too much caffeine to remember what they accomplished
|
177
171
|
at 2 in the morning.
|
@@ -193,7 +187,7 @@ homepage: http://brettterpstra.com/project/doing/
|
|
193
187
|
licenses:
|
194
188
|
- MIT
|
195
189
|
metadata: {}
|
196
|
-
post_install_message:
|
190
|
+
post_install_message:
|
197
191
|
rdoc_options:
|
198
192
|
- "--title"
|
199
193
|
- doing
|
@@ -216,8 +210,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
216
210
|
- !ruby/object:Gem::Version
|
217
211
|
version: '0'
|
218
212
|
requirements: []
|
219
|
-
rubygems_version: 3.0.
|
220
|
-
signing_key:
|
213
|
+
rubygems_version: 3.0.8
|
214
|
+
signing_key:
|
221
215
|
specification_version: 4
|
222
216
|
summary: A command line tool for managing What Was I Doing reminders
|
223
217
|
test_files: []
|