event_nlp 0.4.0 → 0.4.1
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 +5 -5
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/event_nlp.rb +25 -9
- metadata +3 -3
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 3d972a790cf8f12b7e4adf3c017cf3d9efa2c5b93ecd5b56f6586b3e4df08d59
|
|
4
|
+
data.tar.gz: c4d11104ecefb85cf637dfcc9f7146494fab0263c64225719067a0c4b274212c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 42c10bd659a54a757537a9a882603e92f25c5dfe1e077903ebd9086fa6dd7d580a8806801ae42ef7d72b78fb4c1a8507945cb3351b4e39e6c3b860b0ceb7b355
|
|
7
|
+
data.tar.gz: 716474dcbe4691014bea9164d623746ca5cb6031174792c81c6fc2ec66fcc164869f04e1efea90793bd4f22b0420540498fea83b6f908b35aeac5bcfc0d2eae9
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data.tar.gz.sig
CHANGED
|
Binary file
|
data/lib/event_nlp.rb
CHANGED
|
@@ -329,15 +329,7 @@ class EventNlp
|
|
|
329
329
|
|
|
330
330
|
end
|
|
331
331
|
|
|
332
|
-
|
|
333
|
-
get /(.*)\s+at\s+(#{times})/i do |title, time|
|
|
334
|
-
|
|
335
|
-
d = Chronic.parse(time)
|
|
336
|
-
|
|
337
|
-
puts [1.45, title].inspect if @debug
|
|
338
|
-
{ title: title, date: d }
|
|
339
|
-
|
|
340
|
-
end
|
|
332
|
+
|
|
341
333
|
|
|
342
334
|
|
|
343
335
|
# 27-Mar@1436 some important day
|
|
@@ -380,6 +372,30 @@ class EventNlp
|
|
|
380
372
|
{ title: title, date: d1, end_date: d2 }
|
|
381
373
|
end
|
|
382
374
|
|
|
375
|
+
# Some event (10 Woodhouse Lane) 30th Nov at 9:15-
|
|
376
|
+
|
|
377
|
+
get /^(.*) #{days} #{months}(?: at)? (#{times})/i do \
|
|
378
|
+
|title, day, month, t1|
|
|
379
|
+
|
|
380
|
+
|
|
381
|
+
d1 = Chronic.parse([month, day, t1].join(' '))
|
|
382
|
+
|
|
383
|
+
puts [4.7, title, d1].inspect if @debug
|
|
384
|
+
|
|
385
|
+
{ title: title, date: d1 }
|
|
386
|
+
end
|
|
387
|
+
|
|
388
|
+
# hall 2 at 11am
|
|
389
|
+
get /(.*)\s+at\s+(#{times})/i do |title, time|
|
|
390
|
+
|
|
391
|
+
d = Chronic.parse(time)
|
|
392
|
+
|
|
393
|
+
puts [1.45, title].inspect if @debug
|
|
394
|
+
{ title: title, date: d }
|
|
395
|
+
|
|
396
|
+
end
|
|
397
|
+
|
|
398
|
+
|
|
383
399
|
# Tuesday 3rd October gas service at Barbara's house morning 9am-1pm
|
|
384
400
|
|
|
385
401
|
get '*' do
|
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.4.
|
|
4
|
+
version: 0.4.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- James Robertson
|
|
@@ -30,7 +30,7 @@ cert_chain:
|
|
|
30
30
|
hfzP67fp+s/TI6Tk+IvaEWBcfX7AV2XjfhS+q3uCBvQRjmbbRg3JO4XdjAQI3q8d
|
|
31
31
|
+P4=
|
|
32
32
|
-----END CERTIFICATE-----
|
|
33
|
-
date: 2018-
|
|
33
|
+
date: 2018-08-19 00:00:00.000000000 Z
|
|
34
34
|
dependencies:
|
|
35
35
|
- !ruby/object:Gem::Dependency
|
|
36
36
|
name: chronic_cron
|
|
@@ -99,7 +99,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
99
99
|
version: '0'
|
|
100
100
|
requirements: []
|
|
101
101
|
rubyforge_project:
|
|
102
|
-
rubygems_version: 2.6
|
|
102
|
+
rubygems_version: 2.7.6
|
|
103
103
|
signing_key:
|
|
104
104
|
specification_version: 4
|
|
105
105
|
summary: 'Parses a calendar event for date, time, and description e.g. hall 2 friday
|
metadata.gz.sig
CHANGED
|
Binary file
|