all_todo 0.2.4 → 0.2.5
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
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +1 -2
- data/lib/all_todo.rb +12 -50
- metadata +1 -1
- 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: 2a8a7191466d855104247bbdbb0aaa39770ba4e9
|
|
4
|
+
data.tar.gz: 6f7d3caa80412e0d7cebf43411ca932ab6e442b3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b5a410e929ddf079c1f84b223a55fb7c2a41325ea6808bc8622de181350fd4df0536edab8c760b46efc1564d7238a5abc04d04a38111e604cb0854b6a923a42e
|
|
7
|
+
data.tar.gz: 3c23ef655fdd84c3a0829bebf99a4026e48a42a2aaa44c013276ef9bc0016bea40cccaa9ca0291e103574caf718e39a0ff8dfcdddd8c0b7d1df8f291ec4c7709
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data.tar.gz.sig
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
��
|
|
2
|
-
���S�9�,�k'�#Bu.��wpZ�#��Uq������])���9f�-�z1e#��$��ӥǂ4Q�9��2Xy|)�v�����y������ة��6Rj�8|��u�藲��
|
|
1
|
+
��D��,�eӌ�[��D��6�X�)�iGI�q���!,����8�����Xh�mE�zI��2�^�z+��+�cJ��[�2\�����~�G/���d4����ˠj?O����%���dc��|U���<�;w��*�C��k��.'�W�la/qָk\H�P�˖Ȋ��2�$<�!n·pX>z���,v���]���l�n<&jLS('㗟�͠�k��{�4��3B�ߨ��k�
|
data/lib/all_todo.rb
CHANGED
|
@@ -69,19 +69,20 @@ class AllTodo
|
|
|
69
69
|
|
|
70
70
|
def detail()
|
|
71
71
|
|
|
72
|
-
|
|
73
|
-
a = scan doc.root.element('records')
|
|
74
|
-
lines = scan_print a
|
|
75
|
-
|
|
76
|
-
filename = 'all_todo_detail.txt'
|
|
77
|
-
heading = [filename, '=' * filename.length, '', ''].join("\n")
|
|
72
|
+
lines = []
|
|
78
73
|
|
|
79
|
-
|
|
74
|
+
@px.each_recursive do |item, parent, level, i|
|
|
75
|
+
|
|
76
|
+
lines << item.to_h.map {|k,v| "%s%s: %s" % [' ' * level, k, v]}.join("\n")
|
|
77
|
+
lines << ['']
|
|
78
|
+
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
([s='all_todo_detail.txt', '=' * s.length, '', ''] + lines).join("\n")
|
|
80
82
|
|
|
81
83
|
end
|
|
82
84
|
|
|
83
|
-
alias breakdown detail
|
|
84
|
-
|
|
85
|
+
alias breakdown detail
|
|
85
86
|
|
|
86
87
|
def parse_detail(s)
|
|
87
88
|
|
|
@@ -112,7 +113,7 @@ class AllTodo
|
|
|
112
113
|
lines << "%s %s" % ['#' * (level+1), x.heading]
|
|
113
114
|
offset_level = -(level + 1)
|
|
114
115
|
|
|
115
|
-
lines.last << ' # ' + x.tags if x.tags
|
|
116
|
+
lines.last << ' # ' + x.tags if x.tags.length > 0
|
|
116
117
|
|
|
117
118
|
else
|
|
118
119
|
|
|
@@ -138,43 +139,4 @@ class AllTodo
|
|
|
138
139
|
|
|
139
140
|
end
|
|
140
141
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
def scan(node)
|
|
145
|
-
|
|
146
|
-
node.elements.map do |section|
|
|
147
|
-
|
|
148
|
-
summary = section.xpath('summary').map do |x|
|
|
149
|
-
@fields.map {|y| x.text(y)}
|
|
150
|
-
end
|
|
151
|
-
|
|
152
|
-
summary + scan(section.element('records'))
|
|
153
|
-
end
|
|
154
|
-
end
|
|
155
|
-
|
|
156
|
-
def scan_print(a, indent=0)
|
|
157
|
-
|
|
158
|
-
lines = []
|
|
159
|
-
|
|
160
|
-
a.each do |row_children|
|
|
161
|
-
|
|
162
|
-
row = row_children.shift
|
|
163
|
-
|
|
164
|
-
@fields.zip(row).each do |col|
|
|
165
|
-
|
|
166
|
-
label, value = col
|
|
167
|
-
lines << ' ' * indent + [label, value].join(': ')
|
|
168
|
-
|
|
169
|
-
end
|
|
170
|
-
|
|
171
|
-
lines << "\n"
|
|
172
|
-
|
|
173
|
-
lines.concat scan_print(row_children, indent+1) if row_children.any?
|
|
174
|
-
|
|
175
|
-
end
|
|
176
|
-
|
|
177
|
-
lines
|
|
178
|
-
end
|
|
179
|
-
|
|
180
|
-
end
|
|
142
|
+
end
|
metadata
CHANGED
metadata.gz.sig
CHANGED
|
Binary file
|