A simple application for retrieving lunch menus of selected restaurants posting them directly on the web. Menus may be also sent to configured services. Supported services are currently:
Download the project and run
composer install from the project directory.
A configuration must be provided in order to use the application. The configuration
is stored in
app/config/parameters.yml. Default values are stored in
The application requires two types of configuration - restaurants and output. Available
options can be found using an
The following command prints all registered parsers and outputs:
Restaurant configuration consist of an id, uri where menu can be found and type of parser to be used. Example configuration may look like:
d2s: restaurants: 'U Pětníka': 'uri': 'http://www.drest.cz/u-petnika' 'parser': 'drest'
Output cofiguration differs with each implementation.
d2s: output: stdout: yes
d2s: output: slack: uri: "uri_with_token" channel: "#test" username: "obědář" icon_emoji: ":stew:"
Accessing the web
Web interface consists of a single page accessible as root resource of the application
http://server/ if application runs in the webspace root or
if the application runs at
Other resources are available for each configured restaurant but these are not supposed
for direct use (URL is
restaurantID must be
Using command line interface
Retrieving the menu of selected restaurant (or restaurants) and sending it to selected
service is accomplished through command line interaface of the application. Use the
bin/console d2s:run command. Output may be selected using an
stdout. Restaurants (their IDs) are given as arguments of the command.
Multiple restaurant IDs may be given at the same time.
bin/console d2s:run 'U Topolů' 'U Pětníka' 'Na Slamníku'
Testing server running in a container can be used to verify your code without hassle. You just need to run
docker-compose up and wait for the server to start listening at http://127.0.0.1:8000. Happy coding!
Extending the application
Writing custom parsers
Writing custom outputs