Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accept textfile containing scanned barcodes #2

Open
jamesbiederbeck opened this issue Mar 14, 2020 · 1 comment
Open

Accept textfile containing scanned barcodes #2

jamesbiederbeck opened this issue Mar 14, 2020 · 1 comment

Comments

@jamesbiederbeck
Copy link

At my last job, I would create a text file as I scanned barcodes for retail stuff.
I made this little python script that can take an inventory CSV, and then depending on the workflow, either increment the stock of an item for each time its barcode was scanned, or assume that we have scanned all instances of that product on hand, and set the value for the sum of the occurrences of a given barcode in the textfile.

Here's what that looks like, for me:
https://github.com/jamesbiederbeck/invmgr/blob/master/receivinghelper.py

Here's somepseudocode:
create empty dict "itemcounts"
open scan file
for each row in scan file, if the barcode is not in itemcounts' keys:
itemcounts[barcode] = 1
if barcode is in itemcounts' keys:
itemcounts[barcode] +=1

Then you have a list of quantities and barcodes!
From here it should be easy to add, or update quantities as appropriate

This would go great with one particular barcode scanner on amazon, which could remember all scanned barcodes, then when you scanned a control code, it would write the full list as HID output through a dongle. This made it easy to go back to my desk, after walking around the store with the scanner. So I just opened up a text document, dumped the scanned barcodes, ran my above script, and I had a small inventory file I could merge back into the POS.

This seems like an easy enough process to generalize, and apply here.

@TheFuzz4
Copy link
Collaborator

I've thought about this and how to do it like take the scanner shopping with me and then let it just unload when I got home and have it run through it all. I think though in order accomplish this I need to figure out how to do this threaded and I am just not there yet with my skills.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants