Skip to content

rafagarci/AllergiesFinder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Allergies Finder

A simple Python script for detecting previously specified food allergies on an input list.

Installation

On this this project's page click on the code button, save and unzip the project on the directory you believe is most appropriate.

Download Code

Running the Program

You must have Python 3's interpreter installed on your computer. You can download the latest Python version here.

Windows

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).

Running on Windows

Mac

Right click the Scrapper.py file and select Open With then click on Python Launcher (version 3 or higher).

Running on Mac

Linux

Navigate to the project's directory using the command line and run the following command:

python3 Scrapper.py

Usage

Finding Allergic Ingredients

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.

Sample Output

Adding New Allergic Ingredients and 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.

Categories format

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.

Exiting the Program

Type quit and press enter.

License

GNU GPLv3 © Rafael García

About

A simple Python script for detecting previously specified allergies on an input list.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages