I got fed up with the mountain of Mylar digikey bags all over my workspace and wanted to organize it. My solution for small passives is to use these small envelopes and a card holder. Makes it super easy to find the right part.. But with my ICs, I needed something larger. I found this post http://hackaday.com/2012/10/14/parts-storage-for-all-your-components/ which described a method using envelopes and mail merge, but that just seemed like too much effort. So instead of spending an hour entering in the information into a spreadsheet, I spent 3 days figuring out how to automate the process and use the barcode. I came across https://github.com/claudyus/digikey-barcode-reader which uses a search engine to look for the digikey barcode and then webscrape but it didn’t work reliably at all. I migrated the search engine to google which helped a little but there were still a lot of failures. So then I looked at the digikey app which had the ability to do barcode lookups. I used fiddler to intercept traffic to see what it was using for its lookups but it stopped working as it didn’t like my forged ssl certificate, but I did find that it was hitting http://services.digikey.com/. If you look there, you’ll find their full API documented, and although they say they only require a username / password, they also require a partner id. Calling and email didn’t help, so I got creative and managed to get that part working. I wrote a bunch of code to get meta data from digikey from either the barcode (only first 7 digits are required) or the SKU. I threw it up on my server at http://reza.net/digikey/ in case others want to use it. It uses latex to generate the envelope and for fun I have it add a fortune at the bottom (from the unix fortune program). The output looks like this
And when printed and put in the box, they look like this
Send me a comment if you can think of an improvement.