https://github.com/oleander/einstein-rb
Push notification service for restaurant Einstein
https://github.com/oleander/einstein-rb
Last synced: 12 months ago
JSON representation
Push notification service for restaurant Einstein
- Host: GitHub
- URL: https://github.com/oleander/einstein-rb
- Owner: oleander
- Created: 2011-05-10T21:44:51.000Z (about 15 years ago)
- Default Branch: master
- Last Pushed: 2012-05-02T02:47:27.000Z (about 14 years ago)
- Last Synced: 2024-10-18T11:28:12.009Z (over 1 year ago)
- Language: Ruby
- Homepage: http://www.butlercatering.se/Lunchmeny
- Size: 723 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Einstein
Push notification service for restaurant [Einstein](http://www.butlercatering.se/einstein.html).
Follow me on [Twitter](http://twitter.com/linusoleander) or [Github](https://github.com/oleander/) for more info and updates.
## How to use
### Today's menu
```` ruby
Einstein::Menu.new(:today).dishes
````
### Menu for any day
```` ruby
Einstein::Menu.new(:monday).dishes
````
### Push to phone
*Einstein* has build in support for [Prowl](https://www.prowlapp.com/).
Just pass you [api key](https://www.prowlapp.com/api_settings.php) to `#push_to` and the menu will be push to you phone within seconds.
```` ruby
Einstein::Menu.new(:monday).push_to("6576aa9fa3fc3e18aca8da9914a166b3")
````
## What's being returned?
`#dishes` returns an array of strings containing each dish for the given day.
## What is being push to the phone?

## Real world example
Here is a real world example using [whenever](https://github.com/javan/whenever).
It will push *today's menu* directly to your iPhone each day at 11:45 AM.
1 . Install whenever. `gem install whenever`.
2 . Navigate to your application, run `wheneverize .`.
3 . Add these lines to your `config/schedule.rb` file.
```` ruby
require "einstein"
every 1.day, at: "11:45 am" do
runner 'Einstein::Menu.new(:today).push_to("6576aa9fa3fc3e18aca8da9914a166b3")'
end
````
4 . Create the cron task using `whenever`.
5 . Done!
## How to install
[sudo] gem install einstein
## Requirements
- [Tesseract](http://code.google.com/p/tesseract-ocr/)
- [ImageMagick](http://www.imagemagick.org/script/index.php)
- Ruby 1.9.2
## License
*Einstein* is released under the *MIT license*.