Skip to content
forked from ijanos/ebedke

crawl pages to check what is for lunch today

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

galistvan/ebedke

 
 

Repository files navigation

Ebédke

There are two hard things in computer science, cache invalidation and deciding where to eat.

Ebédke is Flask frontend and a web crawler that collects the daily menu from pages of restaurants. The collected menus are cached in redis and can be view in an HTML page or in JSON format.

Development

Pipenv is the recommended tool to manage dependencies. A locally installed and running redis server is required at the moment.

First install the dependencies:

pipenv sync

Copy config.py.example as config.py and set the values. A Facebook app token is required to read posts from facebook pages.

Running app.py directly will run the Flask dev server, enough for testing purposes but not ideal for production.

pipenv run python app.py

To test individual providers add their module name as an argument to app.py. Adding an optional integer argument will offset the date, for example:

pipenv run python app.py provider -3

Note that running the scripts individually will skip the redis cache.

Deployment

Using a production webserver with a wsgi server like gunicorn or uwsgi is recommended. An example nginx config is included in the resources directory. It can be used with this example uwsgi command.

uwsgi --plugin python3 --virtualenv /virtualenv/path/ -s /run/ebedke.sock --manage-script-name --mount /=app:app --threads=4 --chmod-socket=664 -T

License

The source code in the repository is licensed under either of

at your option.

The page background pattern is freely available at Heropatterns, licensed under CC BY 4.0.

About

crawl pages to check what is for lunch today

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 88.5%
  • HTML 4.1%
  • JavaScript 3.8%
  • CSS 3.6%