12-20-2009, 06:28 PM | #1 |
Wizard
Posts: 2,895
Karma: 6995721
Join Date: Dec 2008
Location: Idaho, on the side of a mountain
Device: Kindle Oasis, Fire 3d Gen and 5th Gen and Samsung Tab S
|
How do I Create a Python Plugin?
I renamed the file ___plugin.py, and saved it as a zip file. Then I went to plugins, and browsed for the zip file, and clicked add. Nothing happened. Does the zip file have to be in the same file as Calibre?
|
12-20-2009, 06:41 PM | #2 |
Wizard
Posts: 2,895
Karma: 6995721
Join Date: Dec 2008
Location: Idaho, on the side of a mountain
Device: Kindle Oasis, Fire 3d Gen and 5th Gen and Samsung Tab S
|
OK, I see it did add the plugin, and I customized it with my PID, but it is still giving me an error message. Can anyone help?
|
Advert | |
|
12-20-2009, 07:15 PM | #3 |
Sigil & calibre developer
Posts: 2,487
Karma: 1063785
Join Date: Jan 2009
Location: Florida, USA
Device: Nook STR
|
A little information about the error and what you're trying to have the plugin do (what component it deals with and what not) would help.
|
12-21-2009, 07:50 PM | #4 |
Wizard
Posts: 2,895
Karma: 6995721
Join Date: Dec 2008
Location: Idaho, on the side of a mountain
Device: Kindle Oasis, Fire 3d Gen and 5th Gen and Samsung Tab S
|
It is a plugin for dealing with azw drm. I got it from someone who says it works, but when I put it in, customize it with my PID and hit convert, I get the same old "Have to remove DRM first" error message. I would love to convert my entire library. Don't want the script - just want to know how to get it to work!
|
12-21-2009, 08:05 PM | #5 |
creator of calibre
Posts: 44,376
Karma: 23764838
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
That plugin will only run on import not convert. You have to er-add your DRMed files to calibre (note you only need to re add the mobi/prc file not re-create the entry for the book)
|
Advert | |
|
12-21-2009, 10:17 PM | #6 | |
I'm Super Kindle-icious
Posts: 6,734
Karma: 2434103
Join Date: Apr 2008
Location: Long Drive, Calinadia Candafornia
Device: KDXG, KT, Oasis
|
Quote:
|
|
12-22-2009, 09:04 AM | #7 | |
Wizard
Posts: 1,686
Karma: 874275
Join Date: Nov 2008
Location: Virginia Beach, VA
Device: Kindle DX
|
Quote:
Also, you need to make sure that the script is looking for the correct file type. When I first got a hold of said script it was written for .prc and I needed it for .azw. Line 203 is the one you need to look at |
|
12-22-2009, 09:08 AM | #8 | |
I'm Super Kindle-icious
Posts: 6,734
Karma: 2434103
Join Date: Apr 2008
Location: Long Drive, Calinadia Candafornia
Device: KDXG, KT, Oasis
|
Quote:
|
|
12-22-2009, 09:23 AM | #9 |
Wizard
Posts: 1,686
Karma: 874275
Join Date: Nov 2008
Location: Virginia Beach, VA
Device: Kindle DX
|
What will happen is that you import book.azw, calibre will import it, remove the drm, and change the extension to mobi... you will end up with book.mobi in your library
|
12-22-2009, 09:37 AM | #10 | |
I'm Super Kindle-icious
Posts: 6,734
Karma: 2434103
Join Date: Apr 2008
Location: Long Drive, Calinadia Candafornia
Device: KDXG, KT, Oasis
|
Quote:
Thanks! |
|
12-23-2009, 09:55 PM | #11 |
Wizard
Posts: 2,895
Karma: 6995721
Join Date: Dec 2008
Location: Idaho, on the side of a mountain
Device: Kindle Oasis, Fire 3d Gen and 5th Gen and Samsung Tab S
|
Great! I will use it going forward - I was just wanting to remove DRM on my entire library (I have removed it on about half, the other half came from Amazon, so it works on my current reader). Sounds like a fun weekend with mobidedrm6!
|
12-24-2009, 10:09 PM | #12 | |
Wizard
Posts: 2,895
Karma: 6995721
Join Date: Dec 2008
Location: Idaho, on the side of a mountain
Device: Kindle Oasis, Fire 3d Gen and 5th Gen and Samsung Tab S
|
Quote:
I had about 5 to do tonight, and I was dissapointed I couldn't get Calibre to do them. But then I realized 3 of them were TPZ! |
|
12-24-2009, 10:57 PM | #13 |
Wizard
Posts: 2,895
Karma: 6995721
Join Date: Dec 2008
Location: Idaho, on the side of a mountain
Device: Kindle Oasis, Fire 3d Gen and 5th Gen and Samsung Tab S
|
I found the problem. I have to change the extension from mobi to azw first. Then it worked.
|
12-24-2009, 11:19 PM | #14 | |
I'm Super Kindle-icious
Posts: 6,734
Karma: 2434103
Join Date: Apr 2008
Location: Long Drive, Calinadia Candafornia
Device: KDXG, KT, Oasis
|
Quote:
Code:
file_types = set(['prc']) # The file types that this plugin will be applied to Code:
file_types = set(['azw', 'prc', 'mobi']) # The file types that this plugin will be applied |
|
12-24-2009, 11:40 PM | #15 |
Wizard
Posts: 2,895
Karma: 6995721
Join Date: Dec 2008
Location: Idaho, on the side of a mountain
Device: Kindle Oasis, Fire 3d Gen and 5th Gen and Samsung Tab S
|
Gee, Daffy, I think you can be forgiven on Christmas Eve! Thanks - I live to do my own programing!!!
Merry Christmas, Debra |
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Do I need to download python before I plugin mobi dedrm | anarcHy | Plugins | 2 | 09-25-2010 09:33 AM |
New Plugin Type Idea: Library Plugin | cgranade | Plugins | 3 | 09-15-2010 12:11 PM |
Python 2.5 or 2.6? | itimpi | Calibre | 5 | 01-19-2009 12:48 PM |
Python script to create collections | gwynevans | Sony Reader Dev Corner | 2 | 03-13-2008 12:29 PM |
PRS-500 Create LRS and LRF files from Python with pylrs | Falstaff | Sony Reader Dev Corner | 37 | 08-04-2007 07:49 PM |