The amount of food we've seen being thrown out, after a little-too-long of a sit on a pantry shelf, or a hidden placement in the fridge, in our apartments alone, is concerning. Throughout this year, we've seen our roommates throw out overly-ripe bananas, two-week old bread, soiled milk, and much more, because of the fact that they were unable to find recipes that seemed to take full use of them.
What it does
With this application, we implemented a recipe generator that takes the items in your pantry that you may not know what to do with and outputs a recipe in the cuisine you're feeling that day or night.
How I built it
We wrote a Python script that scraped the website allrecipes.com, found ingredients for each recipe under each "world cuisine" category, and stored the data in a .json file. Then we wrote a Java program that asked
Challenges I ran into
Then we wrote a Java program that asks the user for input (what type of cuisine they want, and what items are in their pantry), reads in the .json file, and displays the recipe that falls under the cuisine category that is the best match.
One challenge was writing the web scraping script because neither of us have much experience with Python nor web scraping, but we were able to write it with the help of mentors and the Internet. Another challenge was implementing the user interface; if we had more time, we would have created a webpage as the user interface, and this webpage would supply inputs to the Java program in order to find the best recipe. Thus, we settled with using Java Swing as our temporary user interface.
Accomplishments that I'm proud of
We improved our Python skills and learned how to implement Web scraping. We also learned software implementation practices (how to divide functionality between classes) in Java and how to use the Swing library to interact with the user.
What's next for Pantry to Recipe
The next step would be to fully implement the user interface, as described previously, in the form of a webpage that interacts with the Java program. Another next step would be to increase our database by web scraping other websites (not just one) and other types of cuisines.