display random recipe using a GUI Tkinter application, SQLite3 and RecipeDB
https://youtu.be/5qOnzF7RsNA
author: Mariya Sha
dependencies:
- Tkinter
- Pillow (PIL)
- NumPy
- Pyglet (optional: used for Windows custom fonts)
database webscraped from:
https://cosylab.iiitd.edu.in/recipedb/
using MechanicalSoup and SQLite
find out how you can webscrape your own database with those libraries
by following this tutorial of mine: https://youtu.be/MkGQmZoMuRM
this directory contains the starter files required to follow my YouTube tutorial.
- 2 logos inside the assets folder
- 2 .ttf fonts inside the fonts folder (downloaded from Google Fonts)
- 1 database file inside the data folder
- 1 .png wireframe inside the root folder.
- 1 .py file inside the root folder containing the most basic commands to run a Tkinter window.
this directory contains the complete application, created by following the YouTube tutorial.
as this app uses custom fonts, it's suitable for Windows users only.
an non-OS-dependant version of this project will be uploaded shortly.
in addition to all the files specified in starter_files, this directory contains:
- requirements.txt generated by "pip freeze"
- requirements_conda.txt generated by "conda list" especially for Anaconda users
please note! I've added some horizontal padding with padx=25 both for the title and ingredients.
everything else is a 100% match to the code presented in the tutorial (+ helpful comments)
this directory contains the updated application (January, 2023)
designed with a relational database rather than the database that was shown in the YouTube tutorial.
recipes.db now contains 2 tables:
- recipes (includes a primary_key column)
- ingredients (foreign key: recipe_key)
as a result, 2 functions were slightly modified:
- fetch_db()
- pre_process(recipe_name, table_records)