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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d0c7bd2b46e9ddbc865fb5a1195b4bda3b08b83a
4
- data.tar.gz: b8b3c8c2a827e81b78649b772fbd8bf6d27cbe3d
3
+ metadata.gz: 2a8a7191466d855104247bbdbb0aaa39770ba4e9
4
+ data.tar.gz: 6f7d3caa80412e0d7cebf43411ca932ab6e442b3
5
5
  SHA512:
6
- metadata.gz: c791012d08f74539e0ae8e3bd3a3ce0c94aba4448b7e755a33df488c0c554b4432e0f177f812cbadc4fef032b2f4d40e40edb9adb441e1476b02cc70e4f65823
7
- data.tar.gz: 4558fe4a516f4a68165b564bb7f1ce6fed0668947d6ff3024146c625e78a3846d1f095c89cc792053ed1310f7bbb303c03acfa5cbbaadac7f6fb7e8dd3ee9c8c
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
- ��Y���+�VM�W��#Qo_™�2�'���m'P��jR���l�g�s�o�+�Tw.|�h g�b���r��.ho��܎@�\4��/6�fe�[P���P����kQjh���YLx��8ZG�������3�@V�
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\ HP�˖Ȋ��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
- doc = Rexle.new(@px.to_xml)
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
- heading + lines.join("\n")
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
- private
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
@@ -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
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
metadata.gz.sig CHANGED
Binary file