mensa CLI logo

tests

mensa

CLI tool to query the menu of canteens contained in the OpenMensa database.

Features

example

Installation

Cargo

Only nightly Rust supported at the moment.

console $ cargo install --git https://github.com/MalteT/mensa

Nix

This is a Nix Flake, add it to your configuration or just test the application with:

console $ nix run github:MalteT/mensa

Usage

See mensa --help.

Examples

#

Meals on monday (Click me!)

You can omit the -i/--id if you've configured a default id in the config.toml.

```console $ mensa meals -d mon -i 63

Leipzig, Mensa am Park ┊ ┊ ╭───╴Bohnengemüse ┊ ├─╴Gemüsebeilage 🌱 ┊ ╰╴( 0.55€ ) ... ```

Canteens near your location (Click me!)

```console $ mensa canteens

70 Leipzig, Cafeteria Dittrichring Dittrichring 21, 04109 Leipzig

63 Leipzig, Mensa am Park Universitätsstraße 5, 04109 Leipzig ... ```

All currently known tags (Click me!)

```console $ mensa tags

 0 Acidifier
   Contains artificial acidifier

 1 Alcohol
   Contains alcohol

 2 Antioxidant
   Contains an antioxidant
...

```

Meals of canteens close to your location next sunday (Click me!)

```console $ mensa meals close --date sun

Leipzig, Cafeteria Dittrichring ┊ ┊ ╭───╴Vegetarisch gefüllte Zucchini ┊ ├─╴Vegetarisches Gericht 🧀 ┊ ├╴Rucola-Kartoffelpüree ┊ ├╴Tomaten-Ratatouille-Soße ┊ ╰╴( 2.65€ ) 2 11 12 19

Leipzig, Mensa am Park ┊ ┊ ╭───╴Apfelrotkohl ┊ ├─╴Gemüsebeilage 🌱 ┊ ╰╴( 0.55€ ) 2 ... ```

Count OpenMensa's canteens (Click me!)

console $ mensa canteens --all --json | jq '.[].id' | wc -l 704

Configuration (Optional)

See config.toml for an example. Copy the file to: - $XDG_CONFIG_DIR/mensa/config.toml on Linux, - $HOME/Library/Application Support/mensa/config.toml on macOS, - {FOLDERID_RoamingAppData}\mensa\config.toml on Windows

License: MIT