Skip to main content

Command-line tool to get the current menu for Ghent University restaurants

Project description

ugent-food

PyPI PyPI - Python Version GitHub Workflow Status

Command-line tool to get the current menu for Ghent University restaurants.

This application was made using Zeus WPI' s Hydra API.

Installation

It's recommended to install the tool using pipx to allow running the command from anywhere on your PC, without having to invoke it using python3 -m ugent_food.

$ pipx install ugent-food

If you don't want to use pipx, it can also be installed using pip:

$ pip3 install --user ugent-food

Note: Don't install this in a Virtual Environment, as you won't be able to run it from anywhere else.

Next, you can add an alias to your .bashrc or .zshrc for your own convenience:

# If you installed using pipx
$ echo 'alias food="ugent-food"' >> ~/.bashrc
$ echo 'alias food="ugent-food"' >> ~/.zshrc

# If you installed using pip
$ echo 'alias food="python3 -m ugent_food"' >> ~/.bashrc
$ echo 'alias food="python3 -m ugent_food"' >> ~/.zshrc

You can now simply use food to run the tool.

Usage

To keep the examples short, they use food instead of python3 -m ugent_food to invoke the tool.

Menus

To get the menu for a given day, use the menu command. By default, not passing any arguments will fetch today's menu:

$ food

For convenience, passing this command is optional. You can immediately pass a day (or subcommand) instead of having to explicitly add this as well. The above line is equivalent to

$ food menu

Arguments

To fetch the menu for a specific day, an extra argument can be passed. This can either be a weekday, an offset (relative to today), or a day in DD/MM-format:

$ food monday
$ food tomorrow
$ food 21/09

Configuration

The tool has a couple of settings that you can configure using the set subcommand:

$ food config set skip_weekends true

You can list the current settings with config ls:

$ food config ls

Available settings

Note that boolean arguments can be supplied as any of [true, false, t, f, 1, 0].

Name Description Type (choices) Default
hidden A list of meal kinds that should be hidden when fetching menus. This can be useful for vegetarians and vegans who don't care about the meat dishes. List[String] ("fish", "meat", "soup", "vegan", "vegetarian") []
language The language used to fetch the menus in. String ("en" 🇬🇧 , "nl" 🇧🇪/🇳🇱) "en"
skip_weekends Whether to automatically skip weekends when fetching menus without an explicit day argument. This defaults to true because the restaurants aren't usually open during weekends. For example: using the tool on a Saturday will show the menu for the coming Monday. Boolean True

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

ugent-food-1.1.0.tar.gz (14.5 kB view details)

Uploaded Source

Built Distribution

ugent_food-1.1.0-py3-none-any.whl (17.3 kB view details)

Uploaded Python 3

File details

Details for the file ugent-food-1.1.0.tar.gz.

File metadata

  • Download URL: ugent-food-1.1.0.tar.gz
  • Upload date:
  • Size: 14.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.2

File hashes

Hashes for ugent-food-1.1.0.tar.gz
Algorithm Hash digest
SHA256 4c103b4d3ba5a92e81596a44bb2b6b741a5ee0af17005ede63d1f3fe4abf48ba
MD5 d0fb720cdcd4665d4a22c6ca88d4be77
BLAKE2b-256 5c01843a6975f98ef2e1b26464dce99daad8ae793a815c8795e6a07f88be4a42

See more details on using hashes here.

File details

Details for the file ugent_food-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: ugent_food-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 17.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.2

File hashes

Hashes for ugent_food-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 45c2f5025fddda9a3e05982cf603deccfdc8e34458058aaee4a2eac9af1836e9
MD5 604da1b17120644180fd30c4d04d85c9
BLAKE2b-256 7a96fe69bfa8836d7736ac25ac3b0a0ca17bcaf588fba656b2528b49883aa039

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