--- author: '' category: '' date: 2010/09/01 16:36 description: '' link: '' priority: '' slug: BB913 tags: open source, programming, python title: Goodreads+webcam+python+zbar == hackfun! type: text updated: 2010/09/01 16:36 url_type: '' --- I am a big fan of `GoodReads `_ a social network for people who read books. I read a lot, and I like that I can see what other people think before starting a book, and I can put my short reviews, and I can see what I have been reading, and lots more. In fact, goodreads is going to be a big part of a project I am starting with some PyAr guys. One thing I have been lazy about is adding my book list to goodreads, because it's a bit of a chore. Well, chore no more! Here's how to do it, the hacker way... 1. Get `zbar `_ 2. Get a cheap webcam 3. Get a book 4. Get a 7-line python program (included below) Now `watch the video... `_ Cute, isn't it? Here's the code: .. code-block:: python import os p=os.popen('/usr/bin/zbarcam','r') while True: code = p.readline() print 'Got barcode:', code isbn = code.split(':')[1] os.system('chromium http://www.goodreads.com/search/search?q=%s'%isbn)