reminders_txt 0.4.2 → 0.4.3
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 +0 -0
- data/lib/reminders_txt.rb +36 -3
- metadata +4 -4
- 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: 7bd7ff0bd4b00009d86b9ddb970e9cf9467fa52c
|
4
|
+
data.tar.gz: e769f641f63a1f5dc0bd1188bea511270c08a221
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 75eb9508395b3993f1ec2ce32d36b697ef93d1cf37a23a006d637b6745f1e101ab0ecc7d51f72cfb732745b3dd1be708d8795c25716e19d7cea928a8c32c1ef8
|
7
|
+
data.tar.gz: 75889dda67ffca477fa51be70c45de40830c6cd8b70df9c4c0b397f1794fb5bc111e46d9d4751fe3f06a8cb47d0307c5d0dc00627ce47fa6c154477f9bb92a05
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/reminders_txt.rb
CHANGED
@@ -163,7 +163,39 @@ class RemindersTxt
|
|
163
163
|
|
164
164
|
[:refresh, b]
|
165
165
|
|
166
|
-
end
|
166
|
+
end
|
167
|
+
|
168
|
+
def save_detail()
|
169
|
+
|
170
|
+
# fetch the notes file if it exists
|
171
|
+
filepath = File.dirname @dxfilepath
|
172
|
+
|
173
|
+
notesfile = File.join(filepath, 'reminder_notes.xml')
|
174
|
+
return unless File.exists? notesfile
|
175
|
+
|
176
|
+
dx = Dynarex.new notesfile
|
177
|
+
|
178
|
+
h = dx.all.inject({}) do |r,x|
|
179
|
+
|
180
|
+
a = x.info.lines
|
181
|
+
tag = a.shift[/\w+/]
|
182
|
+
body = a.join.strip
|
183
|
+
|
184
|
+
r.merge(tag.to_sym => body)
|
185
|
+
|
186
|
+
end
|
187
|
+
|
188
|
+
rows = @dx.all.map do |x|
|
189
|
+
hashtag = x.title[/#(\w+)/,1]
|
190
|
+
hashtag ? x.to_h.merge(info: h[hashtag.to_sym]) : x.to_h
|
191
|
+
end
|
192
|
+
|
193
|
+
dx2 = Dynarex.new 'reminders/reminder(input, title, recurring, ' +
|
194
|
+
'date, end_date, info)'
|
195
|
+
dx2.import rows
|
196
|
+
dx2.save File.join(filepath, 'reminder_details.xml')
|
197
|
+
|
198
|
+
end
|
167
199
|
|
168
200
|
def save_dx()
|
169
201
|
|
@@ -172,7 +204,8 @@ class RemindersTxt
|
|
172
204
|
@reminders.each {|x| @dx.create x.to_h}
|
173
205
|
@dx.save @dxfilepath
|
174
206
|
|
207
|
+
save_detail()
|
208
|
+
|
175
209
|
end
|
176
|
-
|
177
|
-
|
210
|
+
|
178
211
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: reminders_txt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -31,7 +31,7 @@ cert_chain:
|
|
31
31
|
n+SSd9dm8JjhZ2pqHtX+bgMZ18hrN06xfR+UPtk5BKC8v1PC0FWxaVR4lom39rFU
|
32
32
|
seDxJNsJgamAKg==
|
33
33
|
-----END CERTIFICATE-----
|
34
|
-
date: 2017-06-
|
34
|
+
date: 2017-06-27 00:00:00.000000000 Z
|
35
35
|
dependencies:
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: dynarex
|
@@ -62,7 +62,7 @@ dependencies:
|
|
62
62
|
version: '0.2'
|
63
63
|
- - ">="
|
64
64
|
- !ruby/object:Gem::Version
|
65
|
-
version: 0.2.
|
65
|
+
version: 0.2.4
|
66
66
|
type: :runtime
|
67
67
|
prerelease: false
|
68
68
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -72,7 +72,7 @@ dependencies:
|
|
72
72
|
version: '0.2'
|
73
73
|
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 0.2.
|
75
|
+
version: 0.2.4
|
76
76
|
- !ruby/object:Gem::Dependency
|
77
77
|
name: chronic_cron
|
78
78
|
requirement: !ruby/object:Gem::Requirement
|
metadata.gz.sig
CHANGED
Binary file
|