Metadata-Version: 2.1
Name: ugent-food
Version: 0.1.1
Summary: Command-line tool to get the current menu for Ghent University restaurants
Home-page: https://github.com/stijndcl/ugent-food
Author: stijndcl
License: MIT
Project-URL: Bug Reports, https://github.com/stijndcl/ugent-food/issues
Project-URL: Source, https://github.com/stijndcl/ugent-food
Keywords: python,food,api,wrapper,zeus,hydra,ugent,ghent,university,resto,restaurants,menu
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: Dutch
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Utilities
Classifier: Typing :: Typed
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: dacite (==1.6.0)
Requires-Dist: requests (==2.27.1)
Requires-Dist: tabulate (==0.8.9)
Provides-Extra: dev
Requires-Dist: coverage (==6.3.2) ; extra == 'dev'
Requires-Dist: mypy (==0.942) ; extra == 'dev'
Requires-Dist: pylint (==2.13.7) ; extra == 'dev'
Requires-Dist: pytest (==7.1.2) ; extra == 'dev'
Requires-Dist: pytest-cov (==3.0.0) ; extra == 'dev'
Requires-Dist: types-requests (==2.27.25) ; extra == 'dev'
Requires-Dist: types-tabulate (==0.8.8) ; extra == 'dev'

# ugent-food

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

This application was made using [Zeus WPI](https://github.com/ZeusWPI)'
s [Hydra API](https://github.com/ZeusWPI/hydra/blob/master/api-resto-02.md).

## Installation

It's recommended to install the tool using [``pipx``](https://pypa.github.io/pipx/#install-pipx) to allow running the command from anywhere on your PC, without having to invoke it using `python3 -m ugent_food`.

```sh
$ pipx install ugent-food
```

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

```sh
$ pip3 install --user ugent-food
```

_Note: **<u>Don't install this in a Virtual Environment</u>**, 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:

```sh
# If you installed using pipx
$ echo 'alias food="ugent_food"' >> ~/.zshrc

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

## 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:

```sh
$ food
```

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

```sh
$ 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:

```sh
$ food monday
$ food tomorrow
$ food 21/09
```

### Configuration

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

```sh
$ food config set skip_weekends true
```

You can list the current settings with `config ls`:

```sh
$ 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 |
|---------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------|---------|
| language      | The language used to fetch the menus in.                                                                                                                                                                                           | String ("en" 🇬🇧 , "nl" 🇧🇪/🇳🇱) | "en"    |
| skip_weekends | Whether to automatically skip weekends when fetching menus. 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    |
