{"id":19413640,"url":"https://github.com/wisehackermonkey/barcode-item-tracker","last_synced_at":"2025-02-25T02:45:51.642Z","repository":{"id":54707222,"uuid":"274250912","full_name":"wisehackermonkey/barcode-item-tracker","owner":"wisehackermonkey","description":"raspberry pi database that connects and tracks items entered useing a barcode scanner","archived":false,"fork":false,"pushed_at":"2021-02-02T22:52:14.000Z","size":2901,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-07T15:44:21.690Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://wisehackermonkey.github.io/barcode-item-tracker/","language":"Python","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/wisehackermonkey.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":"2020-06-22T22:00:02.000Z","updated_at":"2020-06-26T03:35:18.000Z","dependencies_parsed_at":"2022-08-14T00:40:18.879Z","dependency_job_id":null,"html_url":"https://github.com/wisehackermonkey/barcode-item-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/wisehackermonkey%2Fbarcode-item-tracker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wisehackermonkey%2Fbarcode-item-tracker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wisehackermonkey%2Fbarcode-item-tracker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wisehackermonkey%2Fbarcode-item-tracker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wisehackermonkey","download_url":"https://codeload.github.com/wisehackermonkey/barcode-item-tracker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240593150,"owners_count":19825930,"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-11-10T12:34:14.875Z","updated_at":"2025-02-25T02:45:51.611Z","avatar_url":"https://github.com/wisehackermonkey.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# barcode-item-tracker\n raspberry pi database that connects and tracks items entered useing a barcode scanner\n\n[![Python](https://img.shields.io/badge/Python-Enabled-\u003cCOLOR\u003e.svg)](https://shields.io/)[![Node](https://img.shields.io/badge/Node.js-Enabled-purple.svg)](https://shields.io/)[![Raspberry pi](https://img.shields.io/badge/Raspberry_pi-Enabled-blue.svg)](https://shields.io/)[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n```\nby oran collins\ngithub.com/wisehackermonkey\noranbusiness@gmail.com\n20200622\n```\n![](./barcode_v1.gif)\n\n# install\n```\ngit clone https://github.com/wisehackermonkey/barcode-item-tracker.git\ncd barcode-item-tracker\npip3 install -r requirements.txt\n```\n\n# Run\n#### plugin barcode scanner to pc\n##### Shell 1\n```bash\npython3 main.py\n```\n##### Shell 2\n```bash\npython3 server.py\n```\n\n\n# Run\n#### plugin barcode scanner to pc\n##### Shell 1\n```bash\nnodemon --exec python3 main.py\n```\n##### Shell 2\n```bash\nnodemon --watch server/db --exec python server.py\n```\n\n# In development Notes:\n## Run flask server \n```\npip freeze | grep flask \u003e\u003e requirements.txt\nexport FLASK_APP=server.py\nexport FLASK_ENV=development\n\npython -m flask run\nflask run --host=0.0.0.0\n``` \n\n-----\n## Development watch command\n#### Node.js\n```bash\nnpm install -g nodemon\nnodemon --watch server/db --exec python server.py\n```\n\n##### and for barcode scanner script 'main.py'\n```bash\nnodemon --exec python3 main.py\n```\n\u003c!-- ### or\n```\npip install watchdog\nwatchmedo shell-command \\\n --patterns=\"*.json\" \\\n --command='python \"server.py\"' \\\n .\n```  --\u003e\n\n# Dev log\n### MVP: its alive, and works! (20200622)\n![](./Screenshot_5.png)\n\n\n\n### example UPC api call return\n```\n{\n  \"category\": \"\", \n  \"ASIN\": \"\", \n  \"stores\": null, \n  \"description\": \"MORTON SALT COMPANY 26 oz Morton Salt, Iodized\", \n  \"success\": true, \n  \"title\": \"\", \n  \"mpn\": \"\", \n  \"timestamp\": 1592889515, \n  \"brand\": \"\", \n  \"barcode\": \"0024600010030\", \n  \"modified_time\": \"2020-03-17 14:59:12\", \n  \"alias\": \"\", \n  \"images\": null, \n  \"added_time\": \"2012-01-09 19:51:06\", \n  \"metadata\": {\n    \"color\": \"\", \n    \"gender\": \"\", \n    \"age\": \"\", \n    \"msrp\": \"0.00\", \n    \"unit\": \"\", \n    \"size\": \"\"\n  }, \n  \"msrp\": \"0.00\", \n  \"manufacturer\": \"\"\n}\n```\n\n## what i want back \n```\ndescription string\nimages string url\nsuccess bool\n```\n## update Got product name to image working! (20200623)\n![](./barcode_v1.gif)\n\n# succesfull db test \n![](./Screenshot_1.png)\n\n## barcode scans pop up on web server!\n### server working, and db plumed, and barcode scans pop \n![](./Screenshot_2.png)\n\n\n## products showing up on website when scanned!\n#### also switched upc providers\n![](./Screenshot_7.jpg)\n\n\n\n# TODO\n##### v1\n- ~~read barcode into app~~\n##### v2\n- ~~barcode into product name api call~~\n- ~~product name to image url api call~~\n- ~~use beautifuly soup to grab first image from google images~~\n- ~~test scanning products around the house~~\n##### v3\n- ~~add barcode and product name into json database~~\n\n- ~~add results to json database~~\n\n- ~~webapp that renders json database to markdown or html\n  - ~~create web server~~\n##### v4\n- ~~change upc code api provide~~\n##### v5\n- fix db caching issue, on insert\n  - multi-thead server and barcode client\n- add css to frontend \n\n##### Future\n- docker image\n  - pass through usb barcode scanner (hidraw*) to docker container\n\n# Links\n- https://upcdatabase.org/\n- https://pypi.org/project/python-dotenv/\n- https://pypi.org/project/bleach/\n- https://gist.github.com/stephenhouser/c5e2b921c3770ed47eb3b75efbc94799\n- [template generator flask tutorial iternation](https://nicolas.perriault.net/code/2012/dead-easy-yet-powerful-static-website-generator-with-flask/)\n- [nodemon or watchdog project reloader](https://stackoverflow.com/questions/49355010/how-do-i-watch-python-source-code-files-and-restart-when-i-save)\n- [watchdog · PyPI](https://pypi.org/project/watchdog/)\n- [Quickstart Flask Documentation (1.1.x)](https://flask.palletsprojects.com/en/1.1.x/quickstart/)\n- [tinydb PyPI](https://pypi.org/project/tinydb/)\n- [Advanced Usage TinyDB 4.1.1 documentation](https://tinydb.readthedocs.io/en/stable/usage.html#handling-data)\n- [barcodelookup.com api](https://www.barcodelookup.com/api)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwisehackermonkey%2Fbarcode-item-tracker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwisehackermonkey%2Fbarcode-item-tracker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwisehackermonkey%2Fbarcode-item-tracker/lists"}