Automatically plans meals, generates shopping lists, and adapts to your tastes.
> md MealPlanner
> cd MealPlanner
> py -m venv .venv
...
> .\.venv\Scripts\activate
Depending on your machine's configuration, you may need to change your Execution Policy. If that is the case, run the following command before re-running the .\.venv\Scripts\activate
command:
> Set-ExcecutionPolicy Unrestricted -Scope CurrentUser
$ python3 -m venv .venv
...
$ source .venv/bin/activate
(Ask me (Kian) for help here because I haven't actually uploaded the package yet)
> pip install meal_planner
If you install meal_planner
this way, you must activate the virtual environment before running the command (the same way you activated in when you created the environment)
To use meal_planner
, run it as a script (preferrably in its own folder):
> meal_planner
If this is your first time running it, it will create a database.db
file, which is necessary to store your preferences and program data.
You will need to give the program your Tasty API key by setting it as an environment variable. You have two options for doing that:
Create a .env file in the folder where you're running the script and enter the following in it, but replace "(your api key)" with your actual api key:
TASTY_API_KEY=(your api key)
- Open Run by clicking Win+R or searching Run in the search bar.
- In the Run box, type
control userpasswords
. This will bring you to the control panel page for your account. - On the left panel, click on "Change my environment variables".
- Under "User variables for (your account)", click the "New" button.
- For the "Variable name", put
TASTY_API_KEY
. For the "Variable value", put your api key. - Click "OK".
- Open
~/.bash_profile
file
touch ~/.bash_profile; nano ~/.bash_profile
- Add the following line to the end:
export TASTY_API_KEY=(your api key)
After running the program, you'll enter one of two modes. The first time you run it, it will ask you for the number of recipes you want. After inputting those recipes, it will generate a shopping list and recipe list. Those lists will be opened up as .txt files in your default text editor.
The next time you run the program it will ask you what you thought of those recipes so over time it can adapt to your tastes. You can answer 'dislike', 'none' (if you had no opinion), 'like', or 'love'.