{"id":23521602,"url":"https://github.com/emoore29/meal-prompt","last_synced_at":"2025-07-07T05:03:04.153Z","repository":{"id":269409559,"uuid":"907259350","full_name":"emoore29/meal-prompt","owner":"emoore29","description":"Interactive shell for generating meal prompts and managing a TinyDB of ingredients.","archived":false,"fork":false,"pushed_at":"2025-01-01T05:29:41.000Z","size":314,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-14T03:41:46.193Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/emoore29.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-12-23T07:27:00.000Z","updated_at":"2025-01-01T05:29:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"8f2091ea-9873-42a6-ba8f-0d2eaad0b181","html_url":"https://github.com/emoore29/meal-prompt","commit_stats":null,"previous_names":["emoore29/meal-prompt"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/emoore29/meal-prompt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emoore29%2Fmeal-prompt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emoore29%2Fmeal-prompt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emoore29%2Fmeal-prompt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emoore29%2Fmeal-prompt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/emoore29","download_url":"https://codeload.github.com/emoore29/meal-prompt/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emoore29%2Fmeal-prompt/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264016713,"owners_count":23544623,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-25T17:12:45.313Z","updated_at":"2025-07-07T05:03:04.147Z","avatar_url":"https://github.com/emoore29.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Meal Prompt\n\nMeal Prompt is an interactive shell written in Python. It allows users to request a 'meal prompt', which is a list of ingredients semi-randomly selected from a TinyDB. Users can also view and update the database via the CLI.\n\n![Demo](Code_CkIaiVNi7o.gif)\n\n## About\n\nThe purpose of Meal Prompt is to help users eat seasonally and come up with meal ideas. Meal prompts will typically include suggestions of at least one seasonal fruit and/or vegetable alongside a source of carbohydrates, protein, and fat. The prompts are not meant to be a perfect meal. Which ingredients to use, which to ignore, and how to combine them is all for the user to come up with!\n\nHowever, to ensure ingredients are somewhat compatible, ingredients are selected based on their sweet and savoury characteristics. Complimentary ingredients will be used in future updates to improve the compatibility of ingredient suggestions.\n\n## Database structure\n\nMeal Prompt uses TinyDB to manage the ingredients. Each ingredient has the following features:\n\n- Name: string (any)\n- Type: list of valid types ('fruit', 'vegetable', 'carb', 'fat', 'protein')\n- Taste: list of valid tastes ('sweet', 'savoury')\n- Favourite: string ('y' or 'n')\n- Compliments: list of strings (any)\n- Season: list of two integers representing the month range the item is in season (empty for non-seasonal items)\n\nIngredient names are not validated - it is up to the user to input real ingredients. This gives the user flexibility to add non-conventional ingredient names. As such, complimentary ingredient names are also not validated.\n\nValidation does occur for names in the sense that an ingredient can only have one name.\n\n## Prompt Generation Algorithm\n\n1. A random type is selected from the list of valid types\n2. A random ingredient of that type is selected from the database (if the type is fruit/vegetable, the ingredient must be seasonal)\n3. If the ingredient has not already been added, it is added to a list tracking added ingredients\n4. The type is removed from the list of types to search for\n5. The ingredient is printed to the console\n6. Repeat steps 1-5 until there are no more types left to search for\n\nThis ensures no repeat ingredients are given in the meal prompt, and minimises type repetition (some duplicate types are unavoidable because ingredients can have multiple types).\n\nNote: There is a small weight in favour of selecting favourited ingredients.\n\nWeighting complimentary ingredients will be added in the future.\n\n## Commands\n\n- help -- shows command documentation\n- add -- add an item\n- edit -- edit an item\n- pmt -- generate a meal prompt\n- quit -- quit the program\n- rm -- remove an item\n- show -- show an item or items\n\nCommand documentation can be viewed in further detail when running the program or in the code itself.\n\n## Unit testing\n\nUnit testing is currently being written.\n\n## Installation Instructions\n\n```\n# Open a terminal (Command Prompt or PowerShell for Windows, Terminal for macOS or Linux)\n\n# Ensure Git is installed\n# Visit https://git-scm.com to download and install console Git if not already installed\n\n# Clone the repository\ngit clone https://github.com/emoore29/meal-prompt.git\n\n# Navigate to the project directory\ncd meal-prompt\n\n# Install dependencies\npip install -r requirements.txt\n\n# Run the program\npy meal_prompt.py\n```\n\n## Requirements\n\n- Python 3.12.2 or higher\n- Dependencies: Listed in requirements.txt\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femoore29%2Fmeal-prompt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femoore29%2Fmeal-prompt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femoore29%2Fmeal-prompt/lists"}