Commit graph

86 commits

Author SHA1 Message Date
Malte Tammena a2eaa80d08 Fix #13, make flags more flexible 2021-10-25 22:28:21 +02:00
Malte Tammena 321037a8a8 Abstract over Cache
Add `Cache` trait and implement it for the `Cacache` and `DummyCache`.
Fix tests to use the DummyCache, dropping old dependencies.
See #11.
2021-10-25 22:20:45 +02:00
Malte Tammena b21f921b03 Add Api trait
This should abstract away from the actual implementation and allow
for reproducible, local tests with a DummyApi.
Tests have been rewritten to use the DummyApi.
Prep for #11.
2021-10-25 09:15:07 +02:00
Malte Tammena ca84c76172 Fix missing pupils in default price tags 2021-10-24 22:30:14 +02:00
Malte Tammena b2c8f3b894 Update example 2021-10-24 22:13:34 +02:00
Malte Tammena 151e576ff3 Replace example in README 2021-10-24 19:33:49 +02:00
Malte Tammena 4d5f962f31 Add example images 2021-10-24 19:24:15 +02:00
Malte Tammena 2d4d455091 Fix text width calculations 2021-10-24 18:32:28 +02:00
Malte Tammena 770056e847 Redo color disable on windows 2021-10-24 18:08:25 +02:00
Malte Tammena fd83b36907 Disable emojis/color on windows 2021-10-24 17:53:38 +02:00
Malte Tammena 869c3f789a Update README 2021-10-24 17:39:42 +02:00
Malte Tammena 330070a701 Rename error variant 2021-10-24 17:16:28 +02:00
Malte Tammena 8e819d242e Bump version, update dependencies 2021-10-24 17:06:17 +02:00
Malte Tammena b763d10616 Add additional printing info
Make sure when printing meals, there's a note
about canteens without matching meals and canteens
closed on that particular day.
2021-10-24 16:49:27 +02:00
Malte Tammena 070208fb20 Renames and doc 2021-10-24 14:54:18 +02:00
Malte Tammena 36ee1832d9 Disable command tests
They fail under nix and windows and are not very pure
2021-10-22 17:19:35 +02:00
Malte Tammena 93b7edabf7 Disable failing test on windows 2021-10-22 17:08:44 +02:00
Malte Tammena 9339f52755 Make meal fetching respect pagination 2021-10-22 17:05:13 +02:00
Malte Tammena 0fe0494e94 Bump version, update deps 2021-10-22 16:51:16 +02:00
Malte Tammena 5242dd98c3 Add tags
New tags:
 - Acidifier
 - Cacao Containing Fat Glaze
 - Milk -> Lactose
 - Waxed

Also expanded regexes for tag matching.
2021-10-22 16:49:05 +02:00
Malte Tammena c150629446 Add pupils price tag 2021-10-22 16:48:46 +02:00
Malte Tammena bb006be35d Handle empty meal lists 2021-10-22 15:58:09 +02:00
Malte Tammena 7ac8bbfe80 Restructure 2021-10-22 15:41:17 +02:00
Malte Tammena f4ab56acc3 Improve meal printing 2021-10-22 14:55:35 +02:00
Malte Tammena d1b0dc36fe Cleanup, add command tests 2021-10-22 14:10:17 +02:00
Malte Tammena 15e5133f8c Move to global config, rewrite fetching 2021-10-21 20:47:56 +02:00
Malte Tammena 6da8a95a3b Rework fetachable resources 2021-10-21 16:08:44 +02:00
Malte Tammena 9158875169 Respect --json in mensa canteens
See #4.
2021-10-20 20:45:28 +02:00
Malte Tammena ab9bd9801c Respect --json in mensa tags
See #4.
2021-10-20 20:35:08 +02:00
Malte Tammena fcf81a71db Move tag.rs module, add basic --json
The `--json` flag is currently only respected by `mensa meals`.
Relates to #4.
2021-10-20 10:50:40 +02:00
Malte Tammena b5171922f6 Fix license in README 2021-10-20 10:39:13 +02:00
Malte Tammena ce4e7087c4 Remove border around logo 2021-10-20 10:36:32 +02:00
Malte Tammena 93e972fcea Fix coloring for --color never 2021-10-19 17:33:32 +02:00
Malte Tammena 3ffa7a4986 Move to MIT license 2021-10-19 16:56:08 +02:00
Malte Tammena 0c085a9bed Update Readme with logo 2021-10-19 16:50:18 +02:00
Malte Tammena a1300ec7b5 Update logo 2021-10-19 16:24:35 +02:00
Malte Tammena 8704b25088 Add logo 2021-10-19 16:11:29 +02:00
Malte Tammena 4f9c96e6d6 Update README 2021-10-19 16:10:59 +02:00
Malte Tammena 94521f974d Add windows and mac CI
Preparations for #1.
2021-10-19 15:16:33 +02:00
Malte Tammena 3d1e6697d9 Add --color option
The option can be used to overwrite the automatic coloring behaviour.
Fixes #5.
2021-10-19 15:05:01 +02:00
Malte Tammena 5e334cf57f Add --plain flag
Given this option, non-ascii chars will be pruned from the output.
Fixes #2.
2021-10-19 14:29:07 +02:00
Malte Tammena 8ab197b41c Make colorization smarter
Works towards #2.
Also remove termion, working towards #1.
2021-10-18 17:45:41 +02:00
Malte Tammena 1594eeee33 Move meal functions into meal module 2021-10-17 22:49:46 +02:00
Malte Tammena 2500b854e2 Extract geoip stuff into module 2021-10-17 21:19:50 +02:00
Malte Tammena 1fcbadc23d Move state into State struct
Makes it easier to hand it around.
2021-10-17 20:59:52 +02:00
Malte Tammena fd21b90651 Add README.md verification 2021-10-17 15:49:15 +02:00
Malte Tammena c0812208ff Rename workflow 2021-10-17 14:43:52 +02:00
Malte Tammena 4498e6a5ad Add batch to README.md 2021-10-17 14:41:49 +02:00
Malte Tammena f371fdcb0d Rename rust action 2021-10-17 14:34:31 +02:00
Malte Tammena 82ef00c4c5
Fix rust version in Action? 2021-10-17 13:24:46 +02:00