rice-dining 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +3 -3
- data/README.md +48 -5
- data/lib/rice/dining/version.rb +1 -1
- data/png/screenshot.png +0 -0
- data/rice-dining.gemspec +3 -3
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e2e2210476efe563a45b3c1112aa7d8d5ab16bf31e39662411b06add526a13f0
|
4
|
+
data.tar.gz: 2436da34aa0c8ef12a7339ff4862eee51982fc5444e25adbeb902b6140eaf31b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 94ac9f18852adfbb7f763629d5418000400f965df369f306b316c5941f5b23be4234af9bb2c06321430de724db6a18540346d6c6e80fce99c55239b076492dfb
|
7
|
+
data.tar.gz: 390d23ee2369d485c2b17709abcbb80505d34823e437c17c13688f036d11d832a5ba8e9f6238d6ebeace4d4c04b12b88b7f837d69b7ed55f1f58e989d8a2247a
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,18 +1,61 @@
|
|
1
1
|
# rice-dining
|
2
2
|
|
3
|
-
Provides a `rice-dining` executable that prints servery offerings at Rice
|
3
|
+
Provides a `rice-dining` executable that prints servery offerings at Rice,
|
4
|
+
with an API that you can use to extract semi-structured data from the
|
5
|
+
servery menu.
|
6
|
+
|
7
|
+
If you don't like Ruby, shell out from nodejs or something.
|
4
8
|
|
5
9
|
## Installation
|
6
10
|
|
7
11
|
`gem install rice-dining`
|
8
12
|
|
13
|
+
## Using it in your HackRice party planning app
|
14
|
+
|
15
|
+
Everyone loves CSV, right?
|
16
|
+
|
17
|
+
```ruby
|
18
|
+
require 'rice/dining'
|
19
|
+
require 'csv'
|
20
|
+
|
21
|
+
manifest = Rice::Dining.manifest
|
22
|
+
|
23
|
+
CSV.open('dining.csv', 'w') do |csv|
|
24
|
+
mf.locations.each do |loc|
|
25
|
+
loc.items.each do |item|
|
26
|
+
csv << [loc.name, loc.open?, item.name, item.allergens.map(&:id).join(' ')]
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
```
|
31
|
+
|
32
|
+
```csv
|
33
|
+
<...>
|
34
|
+
|
35
|
+
Baker,true,Roasted red potatoes,vegan
|
36
|
+
Baker,true,Buffalo chicken drumsticks with bleu cheese,milk
|
37
|
+
Baker,true,Cod loin with roasted asparagus and corn,fish
|
38
|
+
Baker,true,Grilled tofu steaks with chimichurri,soy vegan
|
39
|
+
Baker,true,Roasted cauliflower & crispy garbanzos,soy vegan
|
40
|
+
Baker,true,Margherita pizza,gluten milk soy vegetarian
|
41
|
+
Baker,true,Pinto bean soup with pico de gallo,soy vegan
|
42
|
+
```
|
43
|
+
|
44
|
+
Note that this query was performed at like 4AM Houston time and all the
|
45
|
+
locations were "open" according to dining.rice.edu ¯\_(ツ)_/¯
|
46
|
+
|
9
47
|
## Invocation
|
10
48
|
|
11
|
-
Run `rice-dining` to print status for everything, or `rice-dining <regex>` to
|
12
|
-
for locations matching `<regex>`.
|
49
|
+
Run `rice-dining` to print status for everything, or `rice-dining <regex>` to
|
50
|
+
print status for locations matching `<regex>`.
|
51
|
+
|
52
|
+
For example, `rice-dining 'baker|seibel'` would display information for the
|
53
|
+
Baker and Seibel serveries.
|
54
|
+
|
55
|
+
## Unicode
|
13
56
|
|
14
|
-
|
15
|
-
|
57
|
+
If the unicode arrows bug you, export `RICE_DINING_NO_UNICODE` and they will
|
58
|
+
go away.
|
16
59
|
|
17
60
|
## Screenshot
|
18
61
|
|
data/lib/rice/dining/version.rb
CHANGED
data/png/screenshot.png
CHANGED
Binary file
|
data/rice-dining.gemspec
CHANGED
@@ -6,7 +6,7 @@ Gem::Specification.new do |s|
|
|
6
6
|
s.authors = ['Morgan Jones']
|
7
7
|
s.email = 'mjones@rice.edu'
|
8
8
|
s.homepage = 'https://numin.it'
|
9
|
-
s.date = '
|
9
|
+
s.date = '2018-09-10'
|
10
10
|
s.summary = 'Gets Rice servery information'
|
11
11
|
s.description = 'Parses the HTML tag soup on the Rice dining homepage to get current servery information'
|
12
12
|
s.license = 'MIT'
|
@@ -15,6 +15,6 @@ Gem::Specification.new do |s|
|
|
15
15
|
s.executables << 'rice-dining'
|
16
16
|
s.has_rdoc = true
|
17
17
|
s.required_ruby_version = '>= 2.0'
|
18
|
-
s.add_dependency 'nokogiri', '~> 1.
|
19
|
-
s.add_runtime_dependency 'colorize', '~> 0.
|
18
|
+
s.add_dependency 'nokogiri', '~> 1.8'
|
19
|
+
s.add_runtime_dependency 'colorize', '~> 0.8'
|
20
20
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rice-dining
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Morgan Jones
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-09-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '1.
|
19
|
+
version: '1.8'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '1.
|
26
|
+
version: '1.8'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: colorize
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '0.
|
33
|
+
version: '0.8'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '0.
|
40
|
+
version: '0.8'
|
41
41
|
description: Parses the HTML tag soup on the Rice dining homepage to get current servery
|
42
42
|
information
|
43
43
|
email: mjones@rice.edu
|