srehwald / eat-api Goto Github PK
View Code? Open in Web Editor NEWSimple static API for some (student) food places in Munich.
Home Page: https://srehwald.github.io/eat-api/
License: MIT License
Simple static API for some (student) food places in Munich.
Home Page: https://srehwald.github.io/eat-api/
License: MIT License
Just a collection thread for ipp-bistro
parser errors (bugs).
könnt ihr auch die MedizinerMensa im rechts der Isar dazunehmen?
https://www.med.fs.tum.de/index.php?id=5
bottom right.
Sync to/from: jpbernius/FMeat.php#2
If I try to parse the dishes for the FMI, it fails:
$ python3 main.py fmi-bistro
Traceback (most recent call last):
File "main.py", line 94, in <module>
main()
File "main.py", line 58, in main
menus = parser.parse(location)
File "/home/fabian/test/eat-api/src/menu_parser.py", line 173, in parse
week_number = int(pdf_name.split("_")[2].replace("KW","").lstrip("0"))
ValueError: invalid literal for int() with base 10: ''
pretty much the title. i think being able to specify the canteen you're interested in via a query parameter would be really useful, and a lot faster than having to go through the dropdown menu, especially on mobile
Would it be possible for you to parse the IPP menu as well?
http://konradhof-catering.de/ipp/
If it's possible, I might switch to you API.
Your API looks like it has a lot of potential. Great work :)
--> UWP-TUM-Campus-App
The IPP parser for the current week crashes, because there are no dishes on Wednesday available.
Link to the PDF.
The parser fails here
positions = [(a.start(), a.end()) for a in list(re.finditer('Tagessuppe siehe Aushang', lines[0]))]
if len(positions) != 5:
# TODO handle special cases (e.g. that bistro is closed)
return None
-> It returns None
$ python3 main.py ipp-bistro
Btw. I'm using #18 to fix the KW parsing crash.
I've noticed that the API returns the wrong dishes for fmi-bistro. The PDFs published here show the current menu.
For instance today (it's Friday 11.01.2019) the API returns:
Minestrone | 1.00€
Grieß-Kokosmilch mit warmen Himbeeren | 3.20€
Schwäbischer Ofenschlüfer | 3.20€
Fischfilet in Kartoffelpanade dazu Kartoffel-Fenchelgemüse | 4.60€
But the actual menu is as follows:
root@b25e34c21b28:/src# python src/main.py fmi-bistro -d 28.11.2017
2017-11-28: [Ofenkürbis mit Tomaten und jungem Spinat: 3.60€, ./. Rahmschwammerl mit Semmelknödel: 4.30€, Schweinegeschnetzelte s in Pfefferrahmsoße mit Kräuterreis: 4.90€]
^^^^^
Prices for dishes are currently hard coded. In order to always have the most up-to-date prices, they need to be parsed from the STWM homepage.
If I try to parse the dishes for the IPP, it fails:
$ python3 main.py ipp-bistro
Traceback (most recent call last):
File "main.py", line 112, in <module>
main()
File "main.py", line 76, in main
menus = parser.parse(location)
File "/home/fabian/eat-api/menu_parser.py", line 287, in parse
call(["pdftotext", "-l", "1", "-layout", temp_pdf.name, temp_txt.name])
File "/usr/lib/python3.5/subprocess.py", line 247, in call
with Popen(*popenargs, **kwargs) as p:
File "/usr/lib/python3.5/subprocess.py", line 676, in __init__
restore_signals, start_new_session)
File "/usr/lib/python3.5/subprocess.py", line 1282, in _execute_child
raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2] No such file or directory: 'pdftotext'
It seems like it misses the pdftotext
file.
Topfenpalatschinken
€ 1,30 / Stk
http://www.wilhelm-gastronomie.de/wp-content/uploads/2018/03/Garching_Speiseplan_KW_11_2018.pdf
Show prices for mediziner mensa dishes
The plan for the current week (KW14) in the FMI bistro has problems being parsed and is missing in the api. Might be because one day is a holiday or because they added additional links on their website?
A command that returns all available canteens in a Json array would be great to automate the process of requesting all menus for all canteens.
Examle output:
[
{
"name":"Mensa Arcisstraße",
"address":"Arcisstr. 17, München",
"latitude":"48.147312",
"longitude":"11.567229"
},
{
"name":"Mensa Garching",
"address":"Lichtenbergstr. 2, Garching",
"latitude":"48.267509",
"longitude":"11.671278"
},
[...]
]
Currently the parser shows only dishes of the day.
It would be great if it would show all types of dishes.
They could get represented like:
"dishes": [
{
"name": "Bio-Tortelloni all'arrabiata",
"type": "Tagesgericht",
"price": 1.9
},
{
"name": "Nudeln",
"type": "Beilagen",
"price": 0.6
},
{
"name": "Reis",
"type": "Beilagen",
"price": 1
},
{
"name": "Bio-Spaghetti bolognese",
"type": "Aktion",
"price": 3
}
]
Since new year FMI Bistro changed the title (snippet from bistro homepage):
<a href="http://www.wilhelm-gastronomie.de/wp-content/uploads/2017/12/Garching_Speiseplan_KW02_2018.pdf">Garching_Speiseplan_KW02_2018</a>
Line 164 in 35fa5d2
So just change Garching-Speiseplan → Garching_Speiseplan and it works (I spare a MR just for one line). Let’s hope this change is persistent.
I'm creating this issue to request clarification about the current state of the eat-api
.
@srehwald are you still planing to actively maintain this project?
If YES:
If NO:
Collaborators
?Ping: @raabf , @kordianbruck , @moredatapls , @jpbernius
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.