Skip to content

bwagner/titlecovers

Repository files navigation

Titlecovers

This project consists of a django application that provides detail-url and images of different sizes as offered by the amazon api for a given product ASIN/isbn number. It uses the German amazon site, but can easily be configured to use other amazon sites (US, UK, etc.)

It uses bottlenose under the hood. As described in its README, before you get started, make sure you have both Amazon Product Advertising and AWS accounts. You need to enter these into a file localsettings.py according to this format (parameters are passed along to bottlenose.Amazon):

AWSAccessKeyId=...
AWSSecretAccessKey=...
AssociateTag=...

The application retrieves detail urls of amazon books by requesting them as follows:

curl http://127.0.0.1:8000/titlecovers/978-3865053053/detailurl

It retrieves images of different sizes ('swatch', 'small', 'tiny', 'medium', 'large') and redirects immediately to the url given by the amazon service.

curl -L http://127.0.0.1:8000/titlecovers/978-3865053053/small

The '-L' option is required for curl to follow the redirection.

The application caches the retrieved urls for a configurable time (default: one week). NOTE: the images themselves are not cached by the application (as this would violate amazon usage terms).

Prerequisite installs

Installation

git clone git://github.com/bwagner/titlecovers.git
cd titlecovers
python manage.py syncdb --noinput
vi localsettings.py # add at least AWSAccessKeyId, AWSSecretAccessKey, AssociateTag
python manage.py runserver

Authors

Bernhard Wagner

License

Copyright 2011 SBS.

Licensed under GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages