event_nlp 0.5.3 → 0.5.4
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.tar.gz.sig +0 -0
- data/lib/event_nlp.rb +12 -11
- metadata +26 -21
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f046c9ebbe0ea0e05075a6eaa38d6b5cf053d5072fc6a0ea7ec93d695f5ea449
|
4
|
+
data.tar.gz: 51912d0dee9bf7c638ddb4b10946ad0f5ce560ed95398ab12a27ea417ae79391
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5e093f418335b13bd36e811176d837caa7ad399d27f09f2d6f06cc057a08a91fd9c84bf19d6d7d8403b136f88ee37d99ee262c60df1285f96a3d205da83fc571
|
7
|
+
data.tar.gz: 1bae302d138066d0913dc3cc7e272d233421faf44a06846e39742c5f09d4fc3cbf0ebd128ac2c002d3e030f8a99ed8bcb94a740ff617cb2eae8697cc905afe49
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/event_nlp.rb
CHANGED
@@ -108,7 +108,7 @@ class EventNlp
|
|
108
108
|
end
|
109
109
|
|
110
110
|
if @debug then
|
111
|
-
puts [0.2, input, title, recurring, time, raw_date, end_date].inspect.debug
|
111
|
+
puts ["0.2".highlight, input, title, recurring, time, raw_date, end_date].inspect.debug
|
112
112
|
end
|
113
113
|
|
114
114
|
{input: input, title: title, recurring: recurring, date: d,
|
@@ -138,7 +138,7 @@ class EventNlp
|
|
138
138
|
end
|
139
139
|
end
|
140
140
|
|
141
|
-
puts [0.3, title, recurring, time, raw_date, end_date].inspect.debug if @debug
|
141
|
+
puts ['0.3'.highlight, title, recurring, time, raw_date, end_date].inspect.debug if @debug
|
142
142
|
{input: input, title: title, recurring: recurring, date: d, end_date:
|
143
143
|
end_date}
|
144
144
|
|
@@ -161,15 +161,16 @@ class EventNlp
|
|
161
161
|
start_date = Chronic.parse(raw_start_date, now: @now - 1,
|
162
162
|
:endian_precedence => :little)
|
163
163
|
|
164
|
+
puts ('recurring: ' + recurring.inspect).debug if @debug
|
164
165
|
puts ('start_date: ' + start_date.inspect).debug if @debug
|
165
166
|
|
166
167
|
if @now > start_date then
|
167
|
-
exp = ChronicCron.new(recurring, start_date).to_expression
|
168
|
+
exp = ChronicCron.new(recurring, start_date, debug: @debug).to_expression
|
168
169
|
puts 'exp: ' + exp.inspect if @debug
|
169
170
|
|
170
|
-
cf = CronFormat.new(exp, start_date)
|
171
|
-
puts cf.to_time if @debug
|
172
|
-
|
171
|
+
cf = CronFormat.new(exp, start_date, debug: @debug)
|
172
|
+
puts ('cf.to_time: ' + cf.to_time.inspect).debug if @debug
|
173
|
+
cf.next until cf.to_time > start_date
|
173
174
|
|
174
175
|
new_date = cf.to_time
|
175
176
|
input.gsub!(/(?<=starting )[^\)]+/, new_date\
|
@@ -193,7 +194,7 @@ class EventNlp
|
|
193
194
|
recurring[/(?<=-)\d+(?::\d+)?(?:[ap]m)?/]
|
194
195
|
end
|
195
196
|
|
196
|
-
puts [0.5, title, recurring, d].
|
197
|
+
puts ['0.5'.highlight, title, recurring, d].join("\n").debug if @debug
|
197
198
|
{input: input, title: title.rstrip, recurring: recurring,
|
198
199
|
date: d, end_date: end_date }
|
199
200
|
|
@@ -204,7 +205,7 @@ class EventNlp
|
|
204
205
|
get /(.*)\s+(\w+ \w+day of (?:the|every) month at .*)/ do
|
205
206
|
|title, recurring|
|
206
207
|
|
207
|
-
puts [1, title, recurring].inspect.debug if @debug
|
208
|
+
puts ['1'.highlight, title, recurring].inspect.debug if @debug
|
208
209
|
{ title: title, recurring: recurring }
|
209
210
|
|
210
211
|
end
|
@@ -216,7 +217,7 @@ class EventNlp
|
|
216
217
|
|
217
218
|
d = Chronic.parse(raw_day + ' ' + time)
|
218
219
|
|
219
|
-
puts [1.5, title, raw_day, time].inspect.debug if @debug
|
220
|
+
puts ['1.5'.highlight, title, raw_day, time].inspect.debug if @debug
|
220
221
|
{ title: title, date: d }
|
221
222
|
|
222
223
|
end
|
@@ -237,7 +238,7 @@ class EventNlp
|
|
237
238
|
Chronic.parse(raw_date + ' '+ time2)
|
238
239
|
end
|
239
240
|
|
240
|
-
puts [4, title, raw_date, date2, time2].inspect.debug if @debug
|
241
|
+
puts ['4'.highlight, title, raw_date, date2, time2].inspect.debug if @debug
|
241
242
|
{title: title, date: d }
|
242
243
|
|
243
244
|
end
|
@@ -268,7 +269,7 @@ class EventNlp
|
|
268
269
|
|
269
270
|
d1, d2 = [t1, t2].map {|t| Chronic.parse([d.to_date.to_s, t].join(' ')) }
|
270
271
|
|
271
|
-
puts [4.65, input, title, raw_day, d1, d2].inspect.debug if @debug
|
272
|
+
puts ['4.65'.highlight, input, title, raw_day, d1, d2].inspect.debug if @debug
|
272
273
|
|
273
274
|
{input: input, title: title, date: d1, end_date: d2 }
|
274
275
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: event_nlp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -10,27 +10,32 @@ bindir: bin
|
|
10
10
|
cert_chain:
|
11
11
|
- |
|
12
12
|
-----BEGIN CERTIFICATE-----
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
+
|
13
|
+
MIIEXjCCAsagAwIBAgIBATANBgkqhkiG9w0BAQsFADAsMSowKAYDVQQDDCF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OCAYEAfOeR8ABSrmM8+Mvgm+urusqQukPUyHKf71qYBY9d
|
29
|
+
2RyOGJc+WY76E4Y9O5QAeUyP8ib6er/A3bQefuMrIFBnygR3Wz0GV0cmnLoMhVlO
|
30
|
+
TqeU1Yt9bdDDMkS3/fhDWMimrkupnhhtjxHO2B4yJ0+OB47HLzMY1NrvUJI1Xuox
|
31
|
+
4SfDeNtYn7Wxb1oIMviDDZqzNTSojyIPSdokR3lQHntTyUA+Q5gPZct0SAOGnWSA
|
32
|
+
gqYmIGDrOpj3p5yV+7ChQAMDOq0qofpisAWHjdTkk9EBG7G9xRcAjG38baeWB843
|
33
|
+
a12bAgeEqsysvhmtF1SD5uIhB+w659QB7fjrX227HhdgXYQ8JvtdhXAZIBcmgJX3
|
34
|
+
63fI7WqlDHr5cuY9XdepWpQcu0k0HVa67S1oalCyc8Gbv4iBH+mV5iSWmSKBHFX7
|
35
|
+
Hp/xNpvPRmTW2ospJ7tp4UsgtLogM+hwp9H5Hs7fJiJpGlVFW91zEk8bnoiDXV2w
|
36
|
+
9tntfqektbvPs/grQCPIucls
|
32
37
|
-----END CERTIFICATE-----
|
33
|
-
date: 2019-
|
38
|
+
date: 2019-09-10 00:00:00.000000000 Z
|
34
39
|
dependencies:
|
35
40
|
- !ruby/object:Gem::Dependency
|
36
41
|
name: chronic_cron
|
metadata.gz.sig
CHANGED
Binary file
|