doing 1.0.13 → 1.0.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -1
- data/bin/doing +13 -3
- data/lib/doing/version.rb +1 -1
- data/lib/doing/wwid.rb +8 -9
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f92c16513eb9ede842ddfdcaf921d7f1facb6dc88d63a969f7a1e191ecddd4c9
|
4
|
+
data.tar.gz: 0a4c4825ada0fee869a40a60fd9a79fd22d5abd50b808e06290d58bbd50ecb60
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dec642c2e0d781cdd0b2a7d9ab6d295b95be05bd6f3b46dbe036feb2c431eb35fed2bc04449a54e7fe33f24b1a39a76113884658398a05d62f9336a4dacb250a
|
7
|
+
data.tar.gz: '09451b049c77702549f33a85a0b57dfe1197dbfbbe05d2791733913630a720f49e55613b031fa6de67e3b5af7726c43d19fc17c1becc9497c26f71139cdef341'
|
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
**A command line tool for remembering what you were doing and tracking what you've done.**
|
4
4
|
|
5
|
-
_If you're one of the rare people like me who find this useful, feel free to
|
5
|
+
_If you're one of the rare people like me who find this useful, feel free to [buy me some coffee](http://brettterpstra.com/donate)._
|
6
6
|
|
7
7
|
[Changelog](#changelog)
|
8
8
|
|
@@ -504,6 +504,10 @@ I'll try to document some of the code structure as I flesh it out. I'm currently
|
|
504
504
|
|
505
505
|
## Changelog
|
506
506
|
|
507
|
+
#### 1.0.14
|
508
|
+
|
509
|
+
Catching up on the changelog. Kind of. A lot has happened, mostly fixes.
|
510
|
+
|
507
511
|
#### 1.0.8pre
|
508
512
|
|
509
513
|
* JSON output option to view commands
|
data/bin/doing
CHANGED
@@ -525,7 +525,7 @@ arg_name 'section [tags]'
|
|
525
525
|
command :show do |c|
|
526
526
|
c.desc 'Tag boolean (AND,OR,NONE)'
|
527
527
|
c.default_value "OR"
|
528
|
-
c.flag [:b,:
|
528
|
+
c.flag [:b,:bool], :default_value => "OR"
|
529
529
|
|
530
530
|
c.desc 'Max count to show'
|
531
531
|
c.default_value 0
|
@@ -785,8 +785,13 @@ end
|
|
785
785
|
|
786
786
|
desc 'List sections'
|
787
787
|
command :sections do |c|
|
788
|
+
c.desc 'List in single column'
|
789
|
+
c.default_value false
|
790
|
+
c.switch [:c,:column], :default_value => false
|
791
|
+
|
788
792
|
c.action do |global_options,options,args|
|
789
|
-
|
793
|
+
joiner = options[:c] ? "\n" : "\t"
|
794
|
+
print wwid.sections.join(joiner)
|
790
795
|
end
|
791
796
|
end
|
792
797
|
|
@@ -909,8 +914,13 @@ end
|
|
909
914
|
|
910
915
|
desc 'List available custom views'
|
911
916
|
command :views do |c|
|
917
|
+
c.desc 'List in single column'
|
918
|
+
c.default_value false
|
919
|
+
c.switch [:c,:column], :default_value => false
|
920
|
+
|
912
921
|
c.action do |global_options,options,args|
|
913
|
-
|
922
|
+
joiner = options[:c] ? "\n" : "\t"
|
923
|
+
print wwid.views.join(joiner)
|
914
924
|
end
|
915
925
|
end
|
916
926
|
|
data/lib/doing/version.rb
CHANGED
data/lib/doing/wwid.rb
CHANGED
@@ -16,7 +16,7 @@ class String
|
|
16
16
|
self.gsub(/(?mi)((http|https):\/\/)?([\w\-_]+(\.[\w\-_]+)+)([\w\-\.,\@?^=%&:\/~\+#]*[\w\-\@^=%&\/~\+#])?/) {|match|
|
17
17
|
m = Regexp.last_match
|
18
18
|
proto = m[1].nil? ? "http://" : ""
|
19
|
-
%Q{<a href="#{proto}#{m[0]}" title="
|
19
|
+
%Q{<a href="#{proto}#{m[0]}" title="Link to #{m[0]}">[#{m[3]}]</a>}
|
20
20
|
}.gsub(/\<(\w+:.*?)\>/) {|match|
|
21
21
|
m = Regexp.last_match
|
22
22
|
unless m[1] =~ /<a href/
|
@@ -521,7 +521,7 @@ class WWID
|
|
521
521
|
if opt[:archive] && section != "Archive" && opt[:count] > 0
|
522
522
|
# concat [count] items from [section] and archive section
|
523
523
|
archived = @content[section]['items'][0..opt[:count]-1].map {|i|
|
524
|
-
i['title'].sub(/(?:@from\(.*?\))?(.*)$/,"\\1 @from(#{i['section']}")
|
524
|
+
i['title'].sub(/(?:@from\(.*?\))?(.*)$/,"\\1 @from(#{i['section']})")
|
525
525
|
}.concat(@content['Archive']['items'])
|
526
526
|
# chop [count] items off of [section] items
|
527
527
|
@content[opt[:section]]['items'] = @content[opt[:section]]['items'][opt[:count]..-1]
|
@@ -604,7 +604,7 @@ class WWID
|
|
604
604
|
if opt[:archive] && opt[:section] != "Archive"
|
605
605
|
@results.push(%Q{Completed and archived "#{@content[opt[:section]]['items'][i]['title']}"})
|
606
606
|
archive_item = @content[opt[:section]]['items'][i]
|
607
|
-
archive_item['title'] = i['title'].sub(/(?:@from\(.*?\))?(.*)$/,"\\1 @from(#{i['section']}")
|
607
|
+
archive_item['title'] = i['title'].sub(/(?:@from\(.*?\))?(.*)$/,"\\1 @from(#{i['section']})")
|
608
608
|
@content['Archive']['items'].push(archive_item)
|
609
609
|
@content[opt[:section]]['items'].delete_at(i)
|
610
610
|
else
|
@@ -724,7 +724,7 @@ class WWID
|
|
724
724
|
@content.each {|k,v|
|
725
725
|
combined['items'] += v['items']
|
726
726
|
}
|
727
|
-
section = opt[:tag_filter] ? opt[:tag_filter]['tags'].map {|tag| "@#{tag}"}.join(" + ") : "doing"
|
727
|
+
section = opt[:tag_filter] && opt[:tag_filter]['bool'] != 'NONE' ? opt[:tag_filter]['tags'].map {|tag| "@#{tag}"}.join(" + ") : "doing"
|
728
728
|
opt[:section] = combined
|
729
729
|
else
|
730
730
|
section = guess_section(opt[:section])
|
@@ -1051,7 +1051,8 @@ EOT
|
|
1051
1051
|
output.sub!(/%section/,item['section']) if item['section']
|
1052
1052
|
|
1053
1053
|
if opt[:tags_color]
|
1054
|
-
output.
|
1054
|
+
last_color = output.scan(/(\e\[[\d;]+m)[^\e]+@/)[-1][0]
|
1055
|
+
output.gsub!(/\s(@[^ \(]+)/," #{colors[opt[:tags_color]]}\\1#{last_color}")
|
1055
1056
|
end
|
1056
1057
|
output.sub!(/%note/,note)
|
1057
1058
|
output.sub!(/%odnote/,note.gsub(/^\t*/,""))
|
@@ -1139,8 +1140,7 @@ EOT
|
|
1139
1140
|
}
|
1140
1141
|
moved_items.each {|item|
|
1141
1142
|
if label
|
1142
|
-
item['title'] = item['title'].sub(/(?:@from\(.*?\))?(.*)$/,"\\1 @from(#{section}") unless section == "Currently"
|
1143
|
-
# item['title'] += " @from(#{section})" unless section == "Currently" || item['title'] =~ /@from\(/
|
1143
|
+
item['title'] = item['title'].sub(/(?:@from\(.*?\))?(.*)$/,"\\1 @from(#{section})") unless section == "Currently"
|
1144
1144
|
end
|
1145
1145
|
}
|
1146
1146
|
@content[section]['items'] = moved_items
|
@@ -1157,8 +1157,7 @@ EOT
|
|
1157
1157
|
|
1158
1158
|
items.each{|item|
|
1159
1159
|
if label
|
1160
|
-
item['title'] = item['title'].sub(/(?:@from\(.*?\))?(.*)$/,"\\1 @from(#{section}") unless section == "Currently"
|
1161
|
-
# item['title'] += " @from(#{section})" unless section == "Currently"
|
1160
|
+
item['title'] = item['title'].sub(/(?:@from\(.*?\))?(.*)$/,"\\1 @from(#{section})") unless section == "Currently"
|
1162
1161
|
end
|
1163
1162
|
}
|
1164
1163
|
|
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: 1.0.
|
4
|
+
version: 1.0.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brett Terpstra
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-02-
|
11
|
+
date: 2020-02-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|