Skip to content

Latest commit

 

History

History
27 lines (23 loc) · 943 Bytes

README.md

File metadata and controls

27 lines (23 loc) · 943 Bytes

mensa-gen

a canteen plan scraper and generator for Studierendenwerk Hamburg locations

you can see it in action here

usage

$ ./mensa-gen [-l <LOCATIONS>] <TEMPLATE> <OUTFILE>

This scrapes the mensa plans for today, optionally restricting locations to those included in the LOCATIONS file and rendering the tera template TEMPLATE to the file OUTFILE

templates

mensa-gen generates pages based on a tera templates. the data is available through a locations array containing items with the following structure:

{
    "name": "the name of the location",
    "meals": [
        {
            "name": "the name of the meal",
            "price": "the price of a meal (as a string with , as a delimiter)",
            "kind": "one of 'Normal', 'Vegetarian' or 'Vegan'"
        },
        ...
    ]
}