umd-coding-workshop / ISBN-Zot

Use the iPhone's camera to read ISBNs from books, automatically look them up using the LIbrary of Congress's catalog API, and import the catalog record into Zotero
2 stars 0 forks source link

Create demo Python script #3

Open spurioso opened 10 years ago

spurioso commented 10 years ago
  1. Take as input an ISBN (ignore gathering ISBN from iPhone for now)
  2. Get metadata from LC and other(?) APIs
  3. Export to Zotero
    • Export directly to Zotero?
    • Export in format that can then be imported to Zotero?
jwestgard commented 10 years ago

For step 2, once we lookup metadata from LC (or other APIs), we will likely have to deal with it as XML. For that, the lxml python module (http://lxml.de) will be very useful. To install lxml on a Mac (I don't know about Windows), I found this command from the installation documentation (http://lxml.de/installation.html) to be essential:

STATIC_DEPS=true sudo pip install lxml
trevormunoz commented 10 years ago

If folks are going to begin tangling with packages that have more oddities about installing in different environments, it might be worthwhile to use virtualenvwrapper (http://virtualenvwrapper.readthedocs.org/en/latest/) or it may become difficult to debug problems creating by installations/environments/dependencies.

jwestgard commented 10 years ago

Thanks Trevor, good tip. I have used venv in the context of some work on a Django project and it definitely simplifies things. For all of this installation and configuration stuff, I have found this page to be the most useful instructions: http://docs.python-guide.org/en/latest/starting/install/osx/