The Yum4FIT is the application, which may be used for increasing your cookings skills. The main idea of the application is the leveling up thanks to cooking food according to recipes generated by the Yum4FIT application. It's the semestral work on MI-PYT@CVUT.
The application uses Yummly API to access the food recipes. There is an option to upload the photo of cooked food on the Instagram and gain XP points. The user has level according to the number of points. This application includes CLI part, GUI part and WEB part.
How to install Yum4FIT:
python -m pip install Yum4FIT-halfdeadpie
There is a need to take a few steps for proper functioning:
create configuration file for Instagram credentials, Yummly application ID and key and server url:
[instagram] username = <Instagram username> password = <Instagram password> hashtag = #Yum4FIT [yummly] api-id = <application id> api-key = <application key> [server] url = <server url>
The convention is to create a file config.cfg in working directory, but the user is able to set the path to configuration file in command line part using -c/--config option. Also, there is an offer to use Instagram credentials in CLI part using the options -u/--username and -p/--password.
After proper configuration, the user is able to use application's functionality.
Generate food:
yum recipe [OPTIONS]
List all #Yum4FIT foods on Instagram:
yum food
Gain XP points for likes:
yum gain
Share photo on instagram:
yum share [OPTIONS] PATH
Add friend connected to food, which you were eating together. The username is the username of friend on the Instagram and ID is the ID of the post on Instagram with that food. You can access it using command yum food:
yum add_friend USERNAME ID
Runs the Flask server with web representing user's state. Offers an option for the friends to confirm the food sharing. Those friends, who has confirmed the sharing food has more valuable likes:
yum run_server [OPTIONS]
Runs the GUI part of the application. To run it properly, you must first run commands yum recipe and yum gain to access the initial state:
yum run
You can view the docummentation on Readthedocs.io or the brief documentation may be generated in the docs directory using the command:
make html
There is a need to take a few steps for proper functioning:
- create the testing profile on the Instagram
- set the configuration file tests/fixtures/config/config.cfg
- set environment variables TEST_USERNAME and TEST_PASSWORD
run the command in Yum4FIT:
python -m pytest tests/
The application uses Instagram API from:
https://github.com/LevPasha/Instagram-API-python