View Single Post
Old 03-14-2010, 04:06 PM   #145
catpower73
Junior Member
catpower73 began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Mar 2010
Device: none
Simple ebook catalog solution using XML/XSL/Perl/WS-Amazon

Attached you'll find my very simple ebook solution using:
- a XML-file storing the catalog;
- a XSL-file (stylesheet) to turn the XML into readable HTML;
- a Perl script to get new metadata using the Amazon Web Services (AWS).

This won't work out-of-the-box! You'll need to get a free account to use the Amazon Web Services (AWS) first. Doing so, you'll get:
- a file named "RequestSignatureHelper.pm" that is used in the Perl script;
- your "Access Key ID", unique for your account;
- your "Secret Access Key", unique for your account.

Put the file "RequestSignatureHelper.pm" in the same folder as the Perl script. Fill in the AWS keys specific to your account in the Perl script.

Open the XML-file in your browser: it should be processed by the stylesheet (XSL-file) into a readable HTML-page. If it does not work, try opening the file "index.htm" in stead. I have added 10 randomly chosen books for reference.

The Perl script searches for all files with a valid EAN/ISBN13 code in their filename, and extension .PDF or .CHM (filetypes I am using). It uses the EAN/ISBN13 to fetch the metadata from Amazon and uses some of it's content to assemble a new filename and one line of XML-tags to add to the file "books.xml".

This solution works for me. It may not be what you are looking for. I thought I'd post it anyway.

What can be improved? I'd like to make the HTML-page more dynamic. Using JSON and some clever JavaScript library, I guess you can make the table sortable and it should be possible to add a filter (input field) to limit the ebook-records shown.

Furthermore, as far as I'm aware of, the Amazon webservices do not return "tags" which is a pity. Adding tags to a book's metadata would increase the usefulness of the catalog tremendously.
Attached Files
File Type: zip mobileread.com.zip (6.3 KB, 509 views)
catpower73 is offline   Reply With Quote