event_nlp 0.2.5 → 0.2.6
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/event_nlp.rb +4 -2
- data.tar.gz.sig +0 -0
- metadata +2 -2
- 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: 3c93ee0375545f7575bb9964ef18ab00d85acd57
|
4
|
+
data.tar.gz: 6fc42b1f54e3bdb3707ab249509ab2a6347e8347
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b8eaa9f79b809aecf758bfec2e1ef87e5f5a41e81e29ce3c0d75a17828e20f53d408f8074a6ed047efa6eef74158b01b8d4cbcbf1ebf4e314d2ff71d78ed501
|
7
|
+
data.tar.gz: 7bc79074a73a76bc21bddb55ebe65cb1756451bb95c873cc56ae8ec210ce29e40264232d7b11b69f313dab210dde20ead75d8f8f05de45e7ec0c2d066dcdadac
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/event_nlp.rb
CHANGED
@@ -61,9 +61,10 @@ class EventNlp
|
|
61
61
|
weekday = Date::DAYNAMES.join('|').downcase
|
62
62
|
months = (Date::MONTHNAMES[1..-1] + Date::ABBR_MONTHNAMES[1..-1])
|
63
63
|
.join('|').downcase
|
64
|
+
time = /(?: (?:at )?(\d+(?::\d+)?am) )?/
|
64
65
|
|
65
66
|
|
66
|
-
get /^(.*)\s+(every \d\w+ \w
|
67
|
+
get /^(.*)\s+(every \d\w+ \w+#{time})\s*#{starting}/ do \
|
67
68
|
|title, recurring, time, raw_date, end_date|
|
68
69
|
|
69
70
|
d = Chronic.parse(raw_date + ' ' + time.to_s)
|
@@ -225,10 +226,11 @@ class EventNlp
|
|
225
226
|
{ title: title, date: d, recurring: recurring }
|
226
227
|
end
|
227
228
|
|
229
|
+
# some event Wednesday
|
228
230
|
# some event Wednesday 11am
|
229
231
|
|
230
232
|
relative_day = '|today|tomorrow|tonight'
|
231
|
-
get /^(.*)\s+((?:#{weekday+relative_day}) \d{1,2}(?::\d{2})?[ap]m)/i do |title, raw_date|
|
233
|
+
get /^(.*)\s+((?:#{weekday+relative_day})(?: \d{1,2}(?::\d{2})?[ap]m)?)/i do |title, raw_date|
|
232
234
|
|
233
235
|
d = Chronic.parse(raw_date)
|
234
236
|
|
data.tar.gz.sig
CHANGED
Binary file
|
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.2.
|
4
|
+
version: 0.2.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -31,7 +31,7 @@ cert_chain:
|
|
31
31
|
/WtgKLMzCAKTHZ2OpN3OTs6j+vsUBIwCb/Ki17Z4YULtRaGg7I8nTjTrHIIJ0yNm
|
32
32
|
kbRihMTezaC+4A==
|
33
33
|
-----END CERTIFICATE-----
|
34
|
-
date: 2017-07-
|
34
|
+
date: 2017-07-19 00:00:00.000000000 Z
|
35
35
|
dependencies:
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: chronic_cron
|
metadata.gz.sig
CHANGED
Binary file
|