weekly_planner 0.3.4 → 0.3.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/weekly_planner.rb +7 -7
- data.tar.gz.sig +0 -0
- 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: 36cce987bca10012cb74f4905ab8b919e1ec5ef6
|
4
|
+
data.tar.gz: 05aa83c0426867aa388165e7926741483f9cffbd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8990cd660c162889724a590791c59695f22c902b901336574bc363e72290d6c780b09525c5326d9a73bb190ffecc121a0dc7df688152b3928666028f0e71a403
|
7
|
+
data.tar.gz: 3d71bbe7490daf14ff06f8787e63933fa46f5a47c45e0232c8eb46221174d6cebc81bbf4b5a6125c745cc59ac03ae77ce13206ff6ee92ed8c1708f262388cd71
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/weekly_planner.rb
CHANGED
@@ -31,13 +31,14 @@ class WeeklyPlanner
|
|
31
31
|
dx = import_to_dx(File.read(fpath))
|
32
32
|
@dx = refresh File.join(path, filename.sub(/\.txt$/,'.xml')), dx
|
33
33
|
sync_archive()
|
34
|
+
|
34
35
|
# purge any past dates
|
35
36
|
while @dx.all.first and Date.parse(@dx.all.first.id, "%Y%m%d") != DateTime.now.to_date \
|
36
37
|
and @dx.all.length > 0 do
|
37
38
|
@dx.all.first.delete
|
38
39
|
|
39
40
|
end
|
40
|
-
|
41
|
+
|
41
42
|
# new days to add?
|
42
43
|
len = 7 - @dx.all.length
|
43
44
|
|
@@ -52,9 +53,8 @@ class WeeklyPlanner
|
|
52
53
|
|
53
54
|
sync_archive @dx.all[-(len)..-1]
|
54
55
|
|
55
|
-
else
|
56
|
-
|
57
|
-
@dx = new_dx
|
56
|
+
#jr230716 else
|
57
|
+
#jr230716 @dx = new_dx
|
58
58
|
|
59
59
|
end
|
60
60
|
|
@@ -154,17 +154,17 @@ class WeeklyPlanner
|
|
154
154
|
dx.title = "Weekly Planner (%s)" % (d).strftime("%d-%b-%Y")
|
155
155
|
|
156
156
|
rows.each.with_index do |raw_x, i|
|
157
|
-
|
157
|
+
|
158
158
|
a = raw_x.lines
|
159
159
|
a.shift
|
160
160
|
heading = "# %s\n" % (d + i).strftime("%d-%b-%Y")
|
161
161
|
|
162
162
|
a.shift # removes the dashed line
|
163
163
|
content = a.join.rstrip
|
164
|
-
dx.create({x: heading + content}, id: (d + i).strftime("%Y%m%d"))
|
164
|
+
dx.create({x: heading + content }, id: (d + i).strftime("%Y%m%d"))
|
165
165
|
|
166
166
|
end
|
167
|
-
|
167
|
+
|
168
168
|
return dx
|
169
169
|
|
170
170
|
end
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|