event_nlp 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 73cd65c68a6459b464bc21d5d91f925fdfb776c7
4
- data.tar.gz: 524ccb60d5660fd2c99520e3915ab672519ea4e0
2
+ SHA256:
3
+ metadata.gz: 3d972a790cf8f12b7e4adf3c017cf3d9efa2c5b93ecd5b56f6586b3e4df08d59
4
+ data.tar.gz: c4d11104ecefb85cf637dfcc9f7146494fab0263c64225719067a0c4b274212c
5
5
  SHA512:
6
- metadata.gz: 5810a9e49803482d1b2ee43f9f03e45848b06fb20b4ded4e75303dfa2c7a955683b527bea1699d0d1f7bf054821ec9b5611a1f2fabfe7652ab03f73c1796143c
7
- data.tar.gz: 6df966634ca2c75075a93df62f509e123db9b7c79234cebe5379d98ce73965775bfc04d6715fd46519aa38a69c4bc6ec11e3286232207096e79dac42198be714
6
+ metadata.gz: 42c10bd659a54a757537a9a882603e92f25c5dfe1e077903ebd9086fa6dd7d580a8806801ae42ef7d72b78fb4c1a8507945cb3351b4e39e6c3b860b0ceb7b355
7
+ data.tar.gz: 716474dcbe4691014bea9164d623746ca5cb6031174792c81c6fc2ec66fcc164869f04e1efea90793bd4f22b0420540498fea83b6f908b35aeac5bcfc0d2eae9
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -329,15 +329,7 @@ class EventNlp
329
329
 
330
330
  end
331
331
 
332
- # hall 2 at 11am
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.0
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-07-05 00:00:00.000000000 Z
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.13
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