Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 06-23-2009, 08:59 PM   #31
ldolse
Wizard
ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.
 
Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
Hmm... still get the same module not found error after re-installing using the -u option from a local copy of the file.
ldolse is offline   Reply With Quote
Old 06-23-2009, 09:56 PM   #32
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 44,207
Karma: 23446406
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Ok just use modify your local copy by adding

main(args=['', 'isbn', 'key'])

to the bottom and then use

calibre-debug -e amazon.py
kovidgoyal is offline   Reply With Quote
Old 06-24-2009, 10:45 AM   #33
ldolse
Wizard
ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.
 
Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
Still no luck. I'm assuming you meant the very last line for that, correct? That failed, but so did every other point in the file.

I'm getting an error about the global names of the functions not being defined.

Here's the output:
Code:
$ calibre-debug -e amazon.py
Rating:
Traceback (most recent call last):
  File "/Applications/calibre Beta6.app/Contents/Resources/loaders/calibre-debug.py", line 9, in <module>
    main()
  File "/Applications/calibre Beta6.app/Contents/Resources/lib/python2.6/site-packages.zip/calibre/debug.py", line 158, in main
  File "amazon.py", line 50, in <module>
    main(args=['', '1416551727', 'AKIAISGM37SF64FSLJEQ']) 
  File "amazon.py", line 42, in main
    print 'Rating:', get_rating(args[1], args[2])
NameError: global name 'get_rating' is not defined
My apologies for my lack of python expertise.
ldolse is offline   Reply With Quote
Old 06-24-2009, 12:06 PM   #34
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 44,207
Karma: 23446406
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Hmm, OK I'll just make sure that module is included in the frozen OS X build for the next beta release. Then you should be able to use the calibre-debug -c,u technique.
kovidgoyal is offline   Reply With Quote
Old 06-26-2009, 06:14 PM   #35
myle00
Connoisseur
myle00 has a complete set of Star Wars action figures.myle00 has a complete set of Star Wars action figures.myle00 has a complete set of Star Wars action figures.myle00 has a complete set of Star Wars action figures.myle00 has a complete set of Star Wars action figures.
 
myle00's Avatar
 
Posts: 71
Karma: 422
Join Date: Jun 2009
Device: Palm Treo
I'm also trying to get the amazon plugin to work because I am hoping to be able to tag each book with its respective category from amazon. However, I'm also getting this error on Windows beta 9.

Code:
Traceback (most recent call last):
  File "calibre\gui2\dialogs\config.pyo", line 491, in add_plugin
  File "C:\Program Files\calibre\library.zip\calibre\customize\ui.py", line 235, in add_plugin
  File "C:\Program Files\calibre\library.zip\calibre\customize\ui.py", line 74, in load_plugin
InvalidPlugin: No valid plugin found in C:/Users/xxxxxxxxxx/Desktop/Book/Science-Textbook/amazon.zip
I'm adding a zipped amazon.py from the GUI when I get this. As for editing the default amazon.py file, I can't seem to find it, which is why I use the one from launchpad.

Thanks.
myle00 is offline   Reply With Quote
Old 06-26-2009, 06:21 PM   #36
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 44,207
Karma: 23446406
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
It's not a plugin, just some code. It has to be tested and developed some more before it becomes usable. Unfortunately, I'm in the middle of moving house right now, so I can't spend any time on it.
kovidgoyal is offline   Reply With Quote
Old 06-26-2009, 06:23 PM   #37
myle00
Connoisseur
myle00 has a complete set of Star Wars action figures.myle00 has a complete set of Star Wars action figures.myle00 has a complete set of Star Wars action figures.myle00 has a complete set of Star Wars action figures.myle00 has a complete set of Star Wars action figures.
 
myle00's Avatar
 
Posts: 71
Karma: 422
Join Date: Jun 2009
Device: Palm Treo
Ok, no rush.
Thanks
myle00 is offline   Reply With Quote
Old 11-08-2009, 01:14 AM   #38
RoninTech
Groupie
RoninTech ought to be getting tired of karma fortunes by now.RoninTech ought to be getting tired of karma fortunes by now.RoninTech ought to be getting tired of karma fortunes by now.RoninTech ought to be getting tired of karma fortunes by now.RoninTech ought to be getting tired of karma fortunes by now.RoninTech ought to be getting tired of karma fortunes by now.RoninTech ought to be getting tired of karma fortunes by now.RoninTech ought to be getting tired of karma fortunes by now.RoninTech ought to be getting tired of karma fortunes by now.RoninTech ought to be getting tired of karma fortunes by now.RoninTech ought to be getting tired of karma fortunes by now.
 
RoninTech's Avatar
 
Posts: 168
Karma: 1000036
Join Date: Oct 2008
Location: Citizen of the World
Device: iPod Touch, Nook Colour, Kobo Touch, Kobo Glo, Nexus 7, Nexus 5, Pixel
Hi all,

Just catching up on Calibre and came across this thread. I'd love Amazon support!

I've attached a proof of concept script, amazon_calibre_working.py (just run it standalone to see the AWS interface in action). You just need to edit in an AWS access key and AWS secret key, which are freely available, at the top of the script. It was pretty straight forward thanks to the boto module. There's also a version of what "/src/calibre/ebooks/metadata/amazon.py" might look like with boto. Is there anyway to use calibre-debug with an external module? If there is I'll try debugging my amazon.py. I'm sure there's also a way to code it without boto, I just hate re-inventing the wheel.

With just an ISBN, AWS can give you information like this:

Quote:
Originally Posted by Output of amazon_calibre_working.py
Title: Star Trek: Destiny: Mere Mortals
Author: David Mack
Publisher: Star Trek
Publication Date: 2008-10-28
Number of Pages: 448
Cover URL: http://ecx.images-amazon.com/images/I/51oMcKExvlL.jpg
Average Rating: 4.5
Number of Reviews: 17
Tags: General & Literary Fiction, Space opera, Radio and television novels, Science fiction, Star trek fiction, American Science Fiction And Fantasy, Fiction, Fiction - Science Fiction, Movie/Tv Tie-Ins, Fiction / Media Tie-In, Fiction / Science Fiction / General, Fiction / Science Fiction / Space Opera, Science Fiction - Star Trek, Media Tie-In - General, Science Fiction - Space Opera, Science Fiction & Fantasy,
Editorial Review: On Earth, Federation President Nanietta Bacco gathers allies and adversaries to form a desperate last line of defense against an impending Borg invasion. In deep space, Captain Jean-Luc Picard and Captain Ezri Dax join together to cut off the Collective's route to the Alpha Quadrant.<P>Half a galaxy away, Captain William Riker and the crew of the <I>Starship Titan</i> have made contact with the reclusive Caeliar -- survivors of a stellar cataclysm that, two hundred years ago, drove fissures through the structure of space and time, creating a loop of inevitability and consigning another captain and crew to a purgatory from which they could never escape.<P>Now the supremely advanced Caeliar will brook no further intrusion upon their isolation, or against the sanctity of their Great Work....For the small, finite lives of mere mortals carry little weight in the calculations of gods.<P>But even gods may come to understand that they underestimate humans at their peril.
Since August this year, you now need to add a signature to your AWS requests, complicating the interface. I had this working last year with the old interface and had noticed that my rating script stopped working this summer. Thanks to boto the change wasn't a big deal and I'll be using this to keep adding the Amazon ratings to all my books. It would be great if it was a part of Calibre.
Attached Files
File Type: zip CalibreAmazon.zip (2.6 KB, 312 views)
RoninTech is offline   Reply With Quote
Old 11-08-2009, 01:24 AM   #39
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 44,207
Karma: 23446406
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You can run your python module using

calibre-debug -e /path/to/python/module.py

There's an open ticket about using Amazon for tag scraping, please add your code to it, and I'll take a look when I get the chance.
kovidgoyal is offline   Reply With Quote
Old 11-08-2009, 01:35 AM   #40
RoninTech
Groupie
RoninTech ought to be getting tired of karma fortunes by now.RoninTech ought to be getting tired of karma fortunes by now.RoninTech ought to be getting tired of karma fortunes by now.RoninTech ought to be getting tired of karma fortunes by now.RoninTech ought to be getting tired of karma fortunes by now.RoninTech ought to be getting tired of karma fortunes by now.RoninTech ought to be getting tired of karma fortunes by now.RoninTech ought to be getting tired of karma fortunes by now.RoninTech ought to be getting tired of karma fortunes by now.RoninTech ought to be getting tired of karma fortunes by now.RoninTech ought to be getting tired of karma fortunes by now.
 
RoninTech's Avatar
 
Posts: 168
Karma: 1000036
Join Date: Oct 2008
Location: Citizen of the World
Device: iPod Touch, Nook Colour, Kobo Touch, Kobo Glo, Nexus 7, Nexus 5, Pixel
Not seeing it Kovid. Tried searching for "Amazon" and "tag scraping" with no joy.

EDIT: Strange searched for scrape and found it. It has Amazon in it but didn't show up when I searched for that...
RoninTech is offline   Reply With Quote
Reply

Tags
book cover, isbn-13


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Would it be possible for Amazon to re-compile Amazon Reader App for Pocketbook OS dev brecklundin PocketBook 3 09-22-2010 08:04 PM
Battery Issues and No Support from Support BJonas Astak EZReader 11 05-29-2010 02:31 AM
Is Astak support on vacation or just stopped support? dmikov Astak EZReader 9 01-22-2010 01:43 PM
Amazon expands language support in Kindle Store Nate the great News 58 01-20-2010 04:46 AM
Amazon Support Home Runs Again! delphidb96 Amazon Kindle 8 12-26-2009 05:18 PM


All times are GMT -4. The time now is 06:58 AM.


MobileRead.com is a privately owned, operated and funded community.