A simple Python script for detecting previously specified food allergies on an input list.
On this this project's page click on the code
button, save and unzip the project on the directory you believe is most appropriate.
You must have Python 3
's interpreter installed on your computer. You can download the latest Python
version here.
Right click the Scrapper.py
file and select Open with
then click on then select the Python
interpreter of choice (must be version 3 or higher).
Right click the Scrapper.py
file and select Open With
then click on Python Launcher
(version 3 or higher).
Navigate to the project's directory using the command line and run the following command:
python3 Scrapper.py
Simply type a list of ingredients separated by commas. The program will output the previously specified allergies that the list contains and will classify them according to previously specified categories.
Open the Scrapper.py
file using your text editor of choice. For example
Windows: right click
Scrapper.py
->Open with
->Notepad
Mac: right click
Scrapper.py
->Open With
->TextEdit
Linux:
vim FolderWithProject/Scrapper.py
There are two main global categories to which more subcategories can be added. Do Not Use
and Avoid
. New subcategories and their corresponding ingredients can be added to each of them.
Both lists follow a similar process when it comes to adding new subcategories and ingredients.
As seen in the picture above each category is a list of lists (each enclosed with []
). The first inner list contains the subcategory names while the remaining lists contain the ingredients to each of these subcategories. In order to add a subcategory it is just needed to first, add the name of the subcategory in the first list and then include its ingredients, as a list, at the end. This process could be further simplified in the future upon request.
Type quit
and press enter
.
GNU GPLv3 © Rafael García