kanban_txt 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 67e88fa7e5e00f8738767e7ec2187d88149b6ff3
4
- data.tar.gz: 8a8f3342c380d4e29569896e21417891b16a8241
3
+ metadata.gz: efcf9a2e1c490666c55e3b01029e606ffc871cd5
4
+ data.tar.gz: 75d3790ffc412637adbc10f74ca97835698f7c43
5
5
  SHA512:
6
- metadata.gz: fdb6f698102332eb1087415d6bb36b30a1b27ede3f71f81c8e5fd93555295703579007ebb719977ef7a76b789d0c2ba26f4b06c676b793bc195668598adc9d3c
7
- data.tar.gz: 37bc972c79c754abe912e4f3027aed2ce46a95eb95c6f5c1492f0bffc321b13929a2d0597b60ad8abd01ba2edf66ee0e07d6c59ecb7eebed625b075c59eb0968
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
- ='~�ep��5dn徔Y�<:��b]+󔼒чF%����?�V4 �@3#��� z{C־.Z�� '_��^��9n'ஆI��#e8�dZI|�t]=f�����z�B����K]���c2x�5���B(���\�N��1G��?z NU�X>��R��S�?T�eEOm�=�~��`+N�ʤ�Q���Q�g���/�K�#�I��ÔW J6�i��%>n-햔υ{ s���fԇȽ:�|U���7�&SD�I *
1
+ }M<H������(am��(���+��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
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kanban_txt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
metadata.gz.sig CHANGED
Binary file