mirror of
https://github.com/MalteT/mensa.git
synced 2024-10-22 21:59:17 +02:00
Update Readme with logo
This commit is contained in:
parent
a1300ec7b5
commit
0c085a9bed
2
.github/workflows/verify-readme.yml
vendored
2
.github/workflows/verify-readme.yml
vendored
|
@ -31,7 +31,7 @@ jobs:
|
||||||
crate: cargo-readme
|
crate: cargo-readme
|
||||||
version: latest
|
version: latest
|
||||||
use-tool-cache: true
|
use-tool-cache: true
|
||||||
- run: cargo readme --output README.md
|
- run: cargo readme --no-indent-headings --output README.md
|
||||||
# This will verify that cargo readme did not do anything
|
# This will verify that cargo readme did not do anything
|
||||||
# If it did, the CI should fail, because the README is outdated
|
# If it did, the CI should fail, because the README is outdated
|
||||||
- run: git diff --exit-code
|
- run: git diff --exit-code
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
<img src="https://raw.githubusercontent.com/MalteT/mensa/main/static/logo.svg?sanitize=true" alt="mensa CLI logo" width="400" align="right">
|
||||||
|
|
||||||
[![tests](https://github.com/MalteT/mensa/actions/workflows/rust.yml/badge.svg)](https://github.com/MalteT/mensa/actions/workflows/rust.yml)
|
[![tests](https://github.com/MalteT/mensa/actions/workflows/rust.yml/badge.svg)](https://github.com/MalteT/mensa/actions/workflows/rust.yml)
|
||||||
|
|
||||||
# mensa
|
# mensa
|
||||||
|
|
|
@ -1,7 +1,3 @@
|
||||||
[![tests](https://github.com/MalteT/mensa/actions/workflows/rust.yml/badge.svg)](https://github.com/MalteT/mensa/actions/workflows/rust.yml)
|
|
||||||
|
|
||||||
# {{crate}}
|
|
||||||
|
|
||||||
{{readme}}
|
{{readme}}
|
||||||
|
|
||||||
License: {{license}}
|
License: {{license}}
|
||||||
|
|
19
flake.lock
19
flake.lock
|
@ -86,10 +86,27 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nixpkgs_3": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1633422745,
|
||||||
|
"narHash": "sha256-gA6Ok64nPbkjHk3Oanq4641EeYkjcKhisDF9wBjLxEk=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "8e1eab9eae4278c9bb1dcae426848a581943db5a",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixpkgs-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"fenix": "fenix",
|
"fenix": "fenix",
|
||||||
"nixCargoIntegration": "nixCargoIntegration"
|
"nixCargoIntegration": "nixCargoIntegration",
|
||||||
|
"nixpkgs": "nixpkgs_3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"rust-analyzer-src": {
|
"rust-analyzer-src": {
|
||||||
|
|
16
flake.nix
16
flake.nix
|
@ -1,10 +1,20 @@
|
||||||
{
|
{
|
||||||
inputs = {
|
inputs = {
|
||||||
|
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||||
nixCargoIntegration.url = "github:yusdacra/nix-cargo-integration";
|
nixCargoIntegration.url = "github:yusdacra/nix-cargo-integration";
|
||||||
fenix.url = "github:nix-community/fenix";
|
fenix.url = "github:nix-community/fenix";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = inputs: inputs.nixCargoIntegration.lib.makeOutputs {
|
outputs = inputs:
|
||||||
root = ./.;
|
let pkgs = import inputs.nixpkgs { system = "x86_64-linux"; };
|
||||||
};
|
in inputs.nixCargoIntegration.lib.makeOutputs {
|
||||||
|
root = ./.;
|
||||||
|
overrides.shell = common: prev: {
|
||||||
|
packages = prev.packages ++ [
|
||||||
|
(pkgs.writeScriptBin "update-readme" ''
|
||||||
|
cargo readme --no-indent-headings -o README.md
|
||||||
|
'')
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
18
src/main.rs
18
src/main.rs
|
@ -1,9 +1,15 @@
|
||||||
|
//! <img src="https://raw.githubusercontent.com/MalteT/mensa/main/static/logo.svg?sanitize=true" alt="mensa CLI logo" width="400" align="right">
|
||||||
|
//!
|
||||||
|
//! [![tests](https://github.com/MalteT/mensa/actions/workflows/rust.yml/badge.svg)](https://github.com/MalteT/mensa/actions/workflows/rust.yml)
|
||||||
|
//!
|
||||||
|
//! # mensa
|
||||||
|
//!
|
||||||
//! CLI tool to query the menu of canteens contained in the
|
//! CLI tool to query the menu of canteens contained in the
|
||||||
//! [OpenMensa](https://openmensa.org) database.
|
//! [OpenMensa](https://openmensa.org) database.
|
||||||
//!
|
//!
|
||||||
//! ![example](https://user-images.githubusercontent.com/11077981/137278085-75ec877a-dba0-44bb-a8dc-6c802e24178c.png)
|
//! ![example](https://user-images.githubusercontent.com/11077981/137278085-75ec877a-dba0-44bb-a8dc-6c802e24178c.png)
|
||||||
//!
|
//!
|
||||||
//! # Features
|
//! ## Features
|
||||||
//!
|
//!
|
||||||
//! - [X] Runs on Linux, macOS and Windows.
|
//! - [X] Runs on Linux, macOS and Windows.
|
||||||
//! - [X] Custom filters and favourites using CLI flags or the
|
//! - [X] Custom filters and favourites using CLI flags or the
|
||||||
|
@ -15,15 +21,15 @@
|
||||||
//! - [ ] List your favourite meals in canteens close to your location.
|
//! - [ ] List your favourite meals in canteens close to your location.
|
||||||
//!
|
//!
|
||||||
//!
|
//!
|
||||||
//! # Installation
|
//! ## Installation
|
||||||
//!
|
//!
|
||||||
//! ## Cargo
|
//! ### Cargo
|
||||||
//!
|
//!
|
||||||
//! ```console
|
//! ```console
|
||||||
//! $ cargo install --git https://github.com/MalteT/mensa
|
//! $ cargo install --git https://github.com/MalteT/mensa
|
||||||
//! ```
|
//! ```
|
||||||
//!
|
//!
|
||||||
//! ## Nix
|
//! ### Nix
|
||||||
//!
|
//!
|
||||||
//! This is a [Nix Flake](https://nixos.wiki/wiki/Flakes), add it
|
//! This is a [Nix Flake](https://nixos.wiki/wiki/Flakes), add it
|
||||||
//! to your configuration or just test the application with:
|
//! to your configuration or just test the application with:
|
||||||
|
@ -33,7 +39,7 @@
|
||||||
//! ```
|
//! ```
|
||||||
//!
|
//!
|
||||||
//!
|
//!
|
||||||
//! # Usage
|
//! ## Usage
|
||||||
//!
|
//!
|
||||||
//! See `mensa --help`.
|
//! See `mensa --help`.
|
||||||
//!
|
//!
|
||||||
|
@ -47,7 +53,7 @@
|
||||||
//! - `mensa tomorrow` shortcut for `mensa meals -d tomorrow [...]`
|
//! - `mensa tomorrow` shortcut for `mensa meals -d tomorrow [...]`
|
||||||
//!
|
//!
|
||||||
//!
|
//!
|
||||||
//! # Configuration
|
//! ## Configuration
|
||||||
//!
|
//!
|
||||||
//! See [config.toml](config.toml) for an example. Copy the file to:
|
//! See [config.toml](config.toml) for an example. Copy the file to:
|
||||||
//! - `$XDG_CONFIG_DIR/mensa/config.toml` on **Linux**,
|
//! - `$XDG_CONFIG_DIR/mensa/config.toml` on **Linux**,
|
||||||
|
|
|
@ -72,7 +72,7 @@ enum Note {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl RawMeal {
|
impl RawMeal {
|
||||||
/// Parse notes and return them split into [`Tags`] and descriptions.
|
/// Parse notes and return them split into [`Tag`]s and descriptions.
|
||||||
fn parse_and_split_notes(&self) -> (HashSet<Tag>, HashSet<String>) {
|
fn parse_and_split_notes(&self) -> (HashSet<Tag>, HashSet<String>) {
|
||||||
self.notes
|
self.notes
|
||||||
.iter()
|
.iter()
|
||||||
|
|
Loading…
Reference in a new issue