Skip to content
This repository has been archived by the owner on Nov 20, 2022. It is now read-only.

Commit

Permalink
update usage
Browse files Browse the repository at this point in the history
  • Loading branch information
srehwald committed Dec 4, 2017
1 parent c7259ba commit bac693c
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,21 @@ https://srehwald.github.io/eat-api/mensa-garching/2017/09.json

### CLI
The JSON files are produced by the tool shown in this repository. Hence, it is either possible to access the API or use the tool itself to obtain the desired menu data. The CLI needs to be used as follows:

```
$ python src/main.py -h
usage: main.py [-h] [-d DATE] [-j PATH]
{mensa-garching,mensa-arcisstrasse,stubistro-grosshadern,fmi-bistro,ipp-bistro}
{fmi-bistro,ipp-bistro,mensa-arcisstr,mensa-arcisstrasse,mensa-garching,mensa-leopoldstr,mensa-lothstr,
mensa-martinsried,mensa-pasing,mensa-weihenstephan,stubistro-arcisstr,stubistro-goethestr,
stubistro-großhadern,stubistro-grosshadern,stubistro-rosenheim,stubistro-schellingstr,
stucafe-adalbertstr,stucafe-akademie-weihenstephan,stucafe-boltzmannstr,stucafe-garching,stucafe-karlstr,
stucafe-pasing}
positional arguments:
{mensa-garching,mensa-arcisstrasse,stubistro-grosshadern,fmi-bistro,ipp-bistro}
{fmi-bistro,ipp-bistro,mensa-arcisstr,mensa-arcisstrasse,mensa-garching,mensa-leopoldstr,mensa-lothstr,
mensa-martinsried,mensa-pasing,mensa-weihenstephan,stubistro-arcisstr,stubistro-goethestr,stubistro-großhadern,
stubistro-grosshadern,stubistro-rosenheim,stubistro-schellingstr,stucafe-adalbertstr,stucafe-akademie-weihenstephan,
stucafe-boltzmannstr,stucafe-garching,stucafe-karlstr,stucafe-pasing}
the location you want to eat at
optional arguments:
Expand All @@ -58,14 +66,16 @@ optional arguments:
directory for JSON output (date parameter will be
ignored if this argument is used)
```

It is mandatory to specify the canteen (e.g. mensa-garching). Furthermore, you can specify a date, for which you would like to get the menu. If no date is provided, all the dishes for the current week will be printed to the command line. the `--jsonify` option is used for the API and produces some JSON files containing the menu data.

#### Example
Here are some sample calls:

```
# Get the menus for the whole current week at mensa-garching
$ python src/main.py mensa-garching
# Get the menu for April 2 at mensa-arcisstrasse
$ python src/main.py mensa-arcisstrasse -d 02.04.2017
```
```

0 comments on commit bac693c

Please sign in to comment.