Skip to main content

Meal plans for university canteens in Bonn

Project description

Meal plans for university canteens in Bonn

GitHub Actions Workflow Status PyPI version FlakeHub

A python script for displaying the meal plans of the canteens of the Studierendenwerk Bonn. The script parses the HTML response of a call to an API. Depending on your request the API might take a few seconds to respond.

an example output

Installation

To install this script, run

 pip install bonn-mensa

MacOS (using homebrew)

To install the application using homebrew, run:

# Add the tap to homebrew
brew tap --force-auto-update alexanderwallau/bonn-mensa https://github.com/alexanderwallau/bonn-mensa

# Install the application
brew install bonn-mensa

# Install the application from main branch
brew install --HEAD bonn-mensa

In case you want to remove the application, run:

brew uninstall bonn-mensa
brew untap alexanderwallau/bonn-mensa
brew autoremove

NixOS (using flakes)

This Repository provides a flake. If you have flakes enabled you can either run

nix run github:alexanderwallau/bonn-mensa -- <options>

for one time use. If you want to add this to your permanent configuration add

bonn-mensa = {
      url = "github:alexanderwallau/bonn-mensa";
      inputs = { nixpkgs.follows = "nixpkgs"; };
    };

to your flake.nix and adjust the rest of your config accordingly if you are using Home-Manager an example can be found here. One could also use the flakehub route and use

fh add "alexanderwallau/bonn-mensa/0.1.81"

Usage

To run the script, simply run mensa. For a list of all arguments, see mensa --help

$ mensa --help
usage: mensa [-h] [--vegan | --vegetarian]
             [--mensa {SanktAugustin, CAMPO, Hofgarten, FoodtruckRheinbach, VenusbergBistro, CasinoZEF/ZEI, Foodtruck, Rabinstraße}]
             [-- price {Student, Staff, Guest}]
             [--filter-categories [CATEGORY ...]] [--date DATE] [--lang {de,en}] [--show-all-allergens]
             [--show-additives] [--no-colors] [--markdown]
             [--glutenfree]

optional arguments:
  -h, --help            show this help message and exit
  --vegan               Only show vegan options
  --vegetarian          Only show vegetarian options
  --mensa {SanktAugustin,CAMPO,Hofgarten,FoodtruckRheinbach,VenusbergBistro,CasinoZEF/ZEI,Foodtruck, Rabinstraße}
                        The canteen to query. Defaults to CAMPO.
  --price {Student, Staff, Guest}
          The price to display on output defaults to Student
  --filter-categories [CATEGORY ...]
                        Meal categories to hide. Defaults to ['Buffet', 'Dessert'].
  --date DATE           The date to query for in YYYY-MM-DD format. Defaults to today.
  --lang {de,en}        The language of the meal plan to query. Defaults to German.
  --show-all-allergens  Show all allergens. By default, only allergens relevant to vegans (e.g. milk or fish) are shown.
  --show-additives      Show additives.
  --glutenfree          Show only gluten free meals
  --no-colors           Do not use any ANSI colors in the output.
  --markdown            Output in markdown table format.
  --verbose             Output Debug Log

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bonn_mensa-1.0.0.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

bonn_mensa-1.0.0-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

Details for the file bonn_mensa-1.0.0.tar.gz.

File metadata

  • Download URL: bonn_mensa-1.0.0.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.4

File hashes

Hashes for bonn_mensa-1.0.0.tar.gz
Algorithm Hash digest
SHA256 ed66a21ee6970d50473146b48d5fdc60efa5f7b8b54c8016495d807cc7952ee4
MD5 bfe93ed5afc2b06afbd8aeca0decdd65
BLAKE2b-256 de2aee0028e2586c94455aa0574be1fd766a3a6ad93c3a35514b42192f26495d

See more details on using hashes here.

File details

Details for the file bonn_mensa-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: bonn_mensa-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 9.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.4

File hashes

Hashes for bonn_mensa-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8fd51b66416e9852219dc217381eac151c39eeb9c32c3c74dbc5875c51b04fca
MD5 de9585e468f3e27f1785ed88af066c1d
BLAKE2b-256 470a8664472d42591b5871b0275f753318fea2910cb432ca1b1e33c59518da70

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page