{"id":13343273,"url":"https://github.com/trueheart78/food-tracker","last_synced_at":"2025-03-12T04:33:05.489Z","repository":{"id":39866037,"uuid":"346915262","full_name":"trueheart78/food-tracker","owner":"trueheart78","description":"Tracks Food using YAML files instead of a traditional database.","archived":true,"fork":false,"pushed_at":"2022-05-24T06:19:25.000Z","size":1004,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-24T15:39:05.804Z","etag":null,"topics":["ruby","sinatra","sinatrarb","yaml"],"latest_commit_sha":null,"homepage":"","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/trueheart78.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}},"created_at":"2021-03-12T02:53:50.000Z","updated_at":"2023-01-28T00:09:06.000Z","dependencies_parsed_at":"2022-08-27T17:20:15.697Z","dependency_job_id":null,"html_url":"https://github.com/trueheart78/food-tracker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trueheart78%2Ffood-tracker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trueheart78%2Ffood-tracker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trueheart78%2Ffood-tracker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trueheart78%2Ffood-tracker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trueheart78","download_url":"https://codeload.github.com/trueheart78/food-tracker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243158974,"owners_count":20245668,"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":["ruby","sinatra","sinatrarb","yaml"],"created_at":"2024-07-29T19:31:07.769Z","updated_at":"2025-03-12T04:33:05.149Z","avatar_url":"https://github.com/trueheart78.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Food Tracker :watermelon: [![CircleCI](https://circleci.com/gh/trueheart78/food-tracker.svg?style=shield)](https://circleci.com/gh/trueheart78/food-tracker)\n\nTracks food.\n\n## Features\n\nEach item supports multiple:\n\n* Brands\n* Expiration dates\n* \"Best by\" dates\n* Custom Locations\n\nItems also support a single \"out of stock\" flag.\n\n## Endpoints\n\n* Index: `/`\n  * Just a landing page, so as to not give site traversal to those that are unaware.\n* Kitchen: `/in-the-kitchen` \n  * Displays items in stock that aren't fully expired.\n* Expiring: `/expiring`\n  * Displays items expiring soon, already expired, and where the \"best buy\" date has passed.\n* Out of stock: `/out-of-stock`\n  * Displays items that are out of stock.\n* Environment: `/env`, `/environment`\n  * Displays all environment variables available.\n  * **Note:** Only available in the `development` environment.\n\n## Tasks\n\n### Sort Data\n\nSorts the types and items in the `data/` YAML files, alphabetically.\n\n```sh\n./tasks/sort_data.rb\n```\n\n### Date Detector (WIP)\n\nSends an email with items that are expiring, expired, and out-of-stock.\n\n```sh\n./tasks/date_detector.rb\n```\n\n## Data Files\n\nUtilizes YAML files, which are located in the `data/` directory.\n\n### Locations\n\nDefault locations are defined in the data files.\n\n### Types\n\nAssigned types are defined in the data files.\n\n### Notations\n\nEach data file supports the use of the following notations (even multiple times per entry):\n\n* Square brackets to denote expiration dates: `[4/30/29]`.\n* Bars to denote \"best by\" dates: `|4/30/29|`.\n* Curly braces to denote brands: `{Reeses's}`.\n* Parentheses to denote custom location: `(freezer)`.\n\n**Note:** For each entry, spacing between the notations does not matter, neither does the order.\n\n#### Out of Stock\n\nThe only limited notation is for the \"out of stock\" marker, which is denoted by `^oos^`. These are items that are generally available, so a re-order is required. These items will not show up on any page except the Out of Stock endpoint.\n\n## Development\n\n### Running the Server Locally\n\nIt is designed to be run with `Shotgun`, to enable code reloading without having to restart the\nserver.\n\n```\nbundle exec shotgun\n```\n\n### Environment File (.env)\n\nCreate a copy of the `.env` file, and then make sure to update it with relevant details:\n\n```sh\ncp .env .env.local\nvim .env.local\n```\n\nLoad order for `.env` files are as follows:\n\n1. `.env.APP_ENV`, where `APP_ENV` is `test` or `development`\n2. `.env.local`\n3. `.env`\n\nYou can setup a `.env.local` for data that is general, and put specifics in the\n`APP_ENV` versions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrueheart78%2Ffood-tracker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrueheart78%2Ffood-tracker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrueheart78%2Ffood-tracker/lists"}