all_todo 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/all_todo.rb +23 -3
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 192b1843267e3884b969ca256cd87a8333b36761
|
4
|
+
data.tar.gz: 9a36c427cb2cd0d0e3505d90307cd7626653c4f5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d16cd2af8a0fb7d81a524a81ed7261b7f32838032640ad21a0fe1bcca2e62a705fabfa24caef79ecece827a0c1917291956bc9e334f6f4a89d4abc33c8d7ba92
|
7
|
+
data.tar.gz: 8e2794188b6f57861e2a73683a0827a917fc0e3072bacbca08ef27b155b21c8842ab501ce2e5b3a029b50f04fb890bcb930e6f97c5453431d91e1ce826400174
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/all_todo.rb
CHANGED
@@ -17,15 +17,20 @@ class AllTodo
|
|
17
17
|
lines = s.lines
|
18
18
|
lines.shift 3
|
19
19
|
|
20
|
-
@fields = %w(todo when duration priority status note tags)
|
20
|
+
@fields = %w( todo heading when duration priority status note tags)
|
21
21
|
declar = "<?ph schema='sections[title]/section[#{@fields.join(',')}]'" +
|
22
22
|
" format_masks[0]='[!todo]'?>"
|
23
23
|
|
24
|
-
|
24
|
+
# add a marker to identify the headings after parsing the records
|
25
25
|
|
26
|
-
|
26
|
+
s2 = lines.join.gsub(/^#+\s+/,'\0:')
|
27
|
+
|
28
|
+
@px = PolyrexHeadings.new(declar + "\n" + s2).to_polyrex
|
29
|
+
|
30
|
+
@px.each_recursive do |x, parent, level|
|
27
31
|
|
28
32
|
todo = x.todo
|
33
|
+
|
29
34
|
raw_status = todo.slice!(/\[.*\]\s+/)
|
30
35
|
x.todo = todo
|
31
36
|
|
@@ -43,6 +48,21 @@ class AllTodo
|
|
43
48
|
|
44
49
|
end
|
45
50
|
|
51
|
+
# is it a heading?
|
52
|
+
|
53
|
+
heading = todo[/^:(.*)/,1]
|
54
|
+
|
55
|
+
if heading then
|
56
|
+
|
57
|
+
# does the heading contain tags?
|
58
|
+
|
59
|
+
raw_tags = heading.slice!(/\s+#.*$/)
|
60
|
+
x.tags = raw_tags[/#\s+(.*)/,1] if raw_tags
|
61
|
+
x.heading = heading
|
62
|
+
x.todo = ''
|
63
|
+
|
64
|
+
end
|
65
|
+
|
46
66
|
end
|
47
67
|
|
48
68
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: all_todo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -31,7 +31,7 @@ cert_chain:
|
|
31
31
|
4IWTpx4UfuUB+a/n3zRd7tPzfsCnbjv0WeNaOLxPEdrqrbPxdMp0ULnHMi6/cuMX
|
32
32
|
+/4csIEIHj2yLg==
|
33
33
|
-----END CERTIFICATE-----
|
34
|
-
date: 2016-11-
|
34
|
+
date: 2016-11-24 00:00:00.000000000 Z
|
35
35
|
dependencies:
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: pxrowx
|
metadata.gz.sig
CHANGED
Binary file
|