kanban_txt 0.1.1 → 0.1.2
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/lib/kanban_txt.rb +40 -0
- data.tar.gz.sig +3 -1
- 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: efcf9a2e1c490666c55e3b01029e606ffc871cd5
|
|
4
|
+
data.tar.gz: 75d3790ffc412637adbc10f74ca97835698f7c43
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8cdd78a91f557a61921b19a4298b70bdac5433f604903098040160c01e22c48fcedeb74ae369792f7af06c488dc9423612cc32c87265a84c69242e4880dc6330
|
|
7
|
+
data.tar.gz: 0f449d1e55de47f2c7480edfdc816a684b507972f62b028e5b77dbcffd7a4c45f4dfe2caa55551c16ba5249944d9c6c556308d680ff195273ed94876bc5f5ae1
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/lib/kanban_txt.rb
CHANGED
|
@@ -20,6 +20,7 @@ class KanbanTxt
|
|
|
20
20
|
if File.exists?(fpath) then
|
|
21
21
|
|
|
22
22
|
@rx = import_to_rx(File.read(fpath))
|
|
23
|
+
housekeeping(@rx)
|
|
23
24
|
|
|
24
25
|
else
|
|
25
26
|
|
|
@@ -63,6 +64,45 @@ class KanbanTxt
|
|
|
63
64
|
File.write File.join(archive_path, filename), rx.to_xml
|
|
64
65
|
|
|
65
66
|
end
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
# experimental feature
|
|
70
|
+
# if a task group or task item is prefixed with a 'x ' then it
|
|
71
|
+
# will be moved to the next column
|
|
72
|
+
#
|
|
73
|
+
def housekeeping(rx)
|
|
74
|
+
|
|
75
|
+
columns = rx.to_h.to_a[1..-1].map(&:last)
|
|
76
|
+
|
|
77
|
+
for i in (0..columns.length - 1)
|
|
78
|
+
|
|
79
|
+
a = columns[i].lines
|
|
80
|
+
|
|
81
|
+
marked = a.select {|x| x[/^x\s+/m]}
|
|
82
|
+
|
|
83
|
+
marked.each do |task|
|
|
84
|
+
|
|
85
|
+
groupid = task[/\w+\d+(?:\.\d+)?(?:\.\d+)?/]
|
|
86
|
+
group = a.grep /#{groupid}/
|
|
87
|
+
first = a.index group.first
|
|
88
|
+
a.slice!(first, group.length)
|
|
89
|
+
|
|
90
|
+
if i + 1 < columns.length then
|
|
91
|
+
columns[i+1] = "\n\n" unless columns[i+1].empty?
|
|
92
|
+
columns[i+1] = task.sub(/^\s*x\s*/,'') + group[1..-1].join.strip
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
columns[i] = a.join.gsub(/^\n\n/,"\n")
|
|
98
|
+
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
rx.to_h.keys[1..-1].each.with_index do |column, i|
|
|
102
|
+
@rx[column] = columns[i]
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
end
|
|
66
106
|
|
|
67
107
|
def import_to_rx(s)
|
|
68
108
|
|
data.tar.gz.sig
CHANGED
|
@@ -1 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
}M<H������(�a�m��(���+��B���Zq
|
|
2
|
+
�l�ćg�e���'6�\.:ͻ/�vYt.*D��0�Ik���`�l61����|���q�zuϪ�E,��l^�ڂ]�A� �e{�E���L[�y)<s|�ޙ
|
|
3
|
+
�?�A*,���ԃ���a��;`c�k���K4�b1ӓa���D�jޟȁ����.�ّ��6 ��݆#�lLX��W'�z���&ڻx�G>�:R]%��djdމW�l�s�m��br
|
metadata
CHANGED
metadata.gz.sig
CHANGED
|
Binary file
|