{"id":30582989,"url":"https://github.com/marcusal/cookbook-scraper-app","last_synced_at":"2025-08-29T08:09:36.775Z","repository":{"id":192449023,"uuid":"365280089","full_name":"MarcusAl/CookBook-Scraper-App","owner":"MarcusAl","description":"A terminal based CookBook app, with live parsing and csv interaction","archived":false,"fork":false,"pushed_at":"2021-05-07T15:52:57.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2023-09-04T20:04:34.992Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MarcusAl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2021-05-07T15:39:31.000Z","updated_at":"2023-09-04T20:04:46.150Z","dependencies_parsed_at":"2023-09-04T20:14:40.776Z","dependency_job_id":null,"html_url":"https://github.com/MarcusAl/CookBook-Scraper-App","commit_stats":null,"previous_names":["marcusal/cookbook-scraper-app"],"tags_count":null,"template":null,"template_full_name":null,"purl":"pkg:github/MarcusAl/CookBook-Scraper-App","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarcusAl%2FCookBook-Scraper-App","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarcusAl%2FCookBook-Scraper-App/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarcusAl%2FCookBook-Scraper-App/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarcusAl%2FCookBook-Scraper-App/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MarcusAl","download_url":"https://codeload.github.com/MarcusAl/CookBook-Scraper-App/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarcusAl%2FCookBook-Scraper-App/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272652384,"owners_count":24970576,"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","status":"online","status_checked_at":"2025-08-29T02:00:10.610Z","response_time":87,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2025-08-29T08:09:36.208Z","updated_at":"2025-08-29T08:09:36.767Z","avatar_url":"https://github.com/MarcusAl.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Issues](https://img.shields.io/github/issues/marcusal/cookbook-scraper-app?style=for-the-badge)\n![Followers](https://img.shields.io/github/followers/marcusal?style=for-the-badge)\n![Stars](https://img.shields.io/github/stars/marcusal?style=for-the-badge)\n![Pull Requests](https://img.shields.io/github/issues-pr/marcusal/cookbook-scraper-app?style=for-the-badge)\n![Last Commit](https://img.shields.io/github/last-commit/marcusal/cookbook-scraper-app/main?style=for-the-badge)\n\nRun the app to start\n\n```bash\nruby lib/app.rb\n```\n\n## 1 - Imports recipes from the web\n\nYou can use the app to find any recipe you'd like\n\n```bash\n-- My CookBook --\nWhat do you want to do?\n\n1. List all recipes\n2. Add a recipe\n3. Delete a recipe\n4. Import recipes from the Internet\n5. Exit\n\n\u003e 4\nWhat ingredient would you like a recipe for?\n\u003e strawberry\n\nLooking for \"strawberry\" recipes on the Internet...\n\n1. Strawberry shortcake\n2. Strawberry slushie\n3. Strawberry martini\n[...] display only the first 5 results\n\nWhich recipe would you like to import? (enter index)\n\u003e 2\nImporting \"Strawberry slushie\"...\n```\n\n## 2 - (User Action) Mark a recipe as done\n\nRecipes can be marked as done:\n\n```bash\n-- Here are all your recipes --\n\n1. [X] Crumpets\n2. [ ] Beans \u0026 Bacon breakfast\n3. [X] Plum pudding\n4. [X] Apple pie\n5. [ ] Christmas crumble\n```\n\n### Pseudo-code\n\nFor this new **user action** (hence new _route_), we need to:\n\n1. Asks the user for a keyword to search\n2. Makes an HTTP request to the recipe's website\n3. Parses the HTML document to extract the first 5 recipes suggested and store them in an Array\n4. Display them in an indexed list\n5. Asks the user which recipe they want to import (ask for an index)\n6. Adds it to the `Cookbook`\n\n### Parsing with Nokogiri\n\nNokogiri is a cool and famous gem used to parse HTML documents (it does other stuff too!) Here is how you can use it to parse a document once you know the CSS selectors of the elements you are interested in. CSS selectors will be explained later, but the gist of it is that you can select all elements with a given `class` attribute by creating the query `.class`.\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcusal%2Fcookbook-scraper-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarcusal%2Fcookbook-scraper-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcusal%2Fcookbook-scraper-app/lists"}