Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 12-24-2008, 08:22 PM   #16
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,017
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Download zip file, open calibre config dialog. Specify path to zip file. Plugin added.

Some plugins might need configuration. Click on the plugin in the plugin list, click the customize plugin button, enter whatever customization information is needed, plugin customized.
kovidgoyal is offline   Reply With Quote
Old 12-25-2008, 12:19 AM   #17
mgrunk
Zealot
mgrunk has learned how to buy an e-book online
 
mgrunk's Avatar
 
Posts: 130
Karma: 96
Join Date: Aug 2008
Location: metro Atlanta, GA
Device: Sony Reader PRS-505
Hey - I just discovered the little tool box icon - yeah! So, now I understand how you'd do the plugins. Thanks.
mgrunk is offline   Reply With Quote
Advert
Old 12-25-2008, 07:10 PM   #18
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,017
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
DOcumentation is at http://calibre.kovidgoyal.net/user_m...customize.html
kovidgoyal is offline   Reply With Quote
Old 12-27-2008, 09:00 PM   #19
junkml
Addict
junkml ought to be getting tired of karma fortunes by now.junkml ought to be getting tired of karma fortunes by now.junkml ought to be getting tired of karma fortunes by now.junkml ought to be getting tired of karma fortunes by now.junkml ought to be getting tired of karma fortunes by now.junkml ought to be getting tired of karma fortunes by now.junkml ought to be getting tired of karma fortunes by now.junkml ought to be getting tired of karma fortunes by now.junkml ought to be getting tired of karma fortunes by now.junkml ought to be getting tired of karma fortunes by now.junkml ought to be getting tired of karma fortunes by now.
 
junkml's Avatar
 
Posts: 277
Karma: 1004969
Join Date: Mar 2007
Device: Sony Reader
Kovid,

I'm trying to get a handle on your plugins.

I copied your "Hello World" script, and pasted it into a file. When I try to add it to Calibre, I get this error:
invalid syntax (, line 1)
Detailed traceback:
Traceback (most recent call last):
File "calibre\gui2\dialogs\config.pyo", line 251, in add_plugin
File "C:\Program Files\calibre\library.zip\calibre\customize\ui.py" , line 173, in add_plugin
File "C:\Program Files\calibre\library.zip\calibre\customize\ui.py" , line 52, in load_plugin
File "", line 1
import os
^
SyntaxError: invalid syntax
Maybe I'm missing something simple, but it seems to be having an invalid syntax error on "import os".

Can you give me any hints?

Thanks.
junkml is offline   Reply With Quote
Old 12-28-2008, 02:00 PM   #20
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,017
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Looks like an indentation error in your version of the hello world plugin. In any case wait a couple of hours, version 0.4.121 will be released its documentation includes a link to the hello world plugin as a zip file that you can test and modify directly.
kovidgoyal is offline   Reply With Quote
Advert
Old 12-28-2008, 02:09 PM   #21
junkml
Addict
junkml ought to be getting tired of karma fortunes by now.junkml ought to be getting tired of karma fortunes by now.junkml ought to be getting tired of karma fortunes by now.junkml ought to be getting tired of karma fortunes by now.junkml ought to be getting tired of karma fortunes by now.junkml ought to be getting tired of karma fortunes by now.junkml ought to be getting tired of karma fortunes by now.junkml ought to be getting tired of karma fortunes by now.junkml ought to be getting tired of karma fortunes by now.junkml ought to be getting tired of karma fortunes by now.junkml ought to be getting tired of karma fortunes by now.
 
junkml's Avatar
 
Posts: 277
Karma: 1004969
Join Date: Mar 2007
Device: Sony Reader
U Da Man!

Seriously. I know you hear this a lot, but the work you've done on this application is incredible. Our devices would not be as easy/fun to use without the work you've done on Calibre.
junkml is offline   Reply With Quote
Old 12-28-2008, 02:10 PM   #22
zelda_pinwheel
zeldinha zippy zeldissima
zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.
 
zelda_pinwheel's Avatar
 
Posts: 27,827
Karma: 921169
Join Date: Dec 2007
Location: Paris, France
Device: eb1150 & is that a nook in her pocket, or she just happy to see you?
Quote:
Originally Posted by junkml View Post
U Da Man!

Seriously. I know you hear this a lot, but the work you've done on this application is incredible. Our devices would not be as easy/fun to use without the work you've done on Calibre.
oh, yep. that is really true. add my appreciation in there as well ! and here's some karma while i'm at it.
zelda_pinwheel is offline   Reply With Quote
Old 12-28-2008, 03:28 PM   #23
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,017
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Well, I only do it 'cause it's fun, and the user community at mobileread is a big part of making it fun
kovidgoyal is offline   Reply With Quote
Old 12-28-2008, 03:32 PM   #24
zelda_pinwheel
zeldinha zippy zeldissima
zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.
 
zelda_pinwheel's Avatar
 
Posts: 27,827
Karma: 921169
Join Date: Dec 2007
Location: Paris, France
Device: eb1150 & is that a nook in her pocket, or she just happy to see you?
Quote:
Originally Posted by kovidgoyal View Post
Well, I only do it 'cause it's fun, and the user community at mobileread is a big part of making it fun
aw.
zelda_pinwheel is offline   Reply With Quote
Old 12-28-2008, 04:40 PM   #25
junkml
Addict
junkml ought to be getting tired of karma fortunes by now.junkml ought to be getting tired of karma fortunes by now.junkml ought to be getting tired of karma fortunes by now.junkml ought to be getting tired of karma fortunes by now.junkml ought to be getting tired of karma fortunes by now.junkml ought to be getting tired of karma fortunes by now.junkml ought to be getting tired of karma fortunes by now.junkml ought to be getting tired of karma fortunes by now.junkml ought to be getting tired of karma fortunes by now.junkml ought to be getting tired of karma fortunes by now.junkml ought to be getting tired of karma fortunes by now.
 
junkml's Avatar
 
Posts: 277
Karma: 1004969
Join Date: Mar 2007
Device: Sony Reader
Okay, I'm back with a question about the plugins.

I downloaded the helloworld_plugin.py, zipped it into my own helloworld_plugin.zip file, and it added to Calibre with no problem.

When I try to edit the file (notepad, wordpad, pythonwin, word, and any other program I can find) it errors with the syntax error on "import os".

What are you using to edit/build your .py files? When I view your helloworld in notepad, there aren't even any line breaks, and it works. I'm running windows Vista if that makes any difference.

Thanks.
junkml is offline   Reply With Quote
Old 12-28-2008, 04:59 PM   #26
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,017
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
The file has unix line endings. Use a programmers editor like notepad++ (free)
kovidgoyal is offline   Reply With Quote
Old 12-28-2008, 05:01 PM   #27
junkml
Addict
junkml ought to be getting tired of karma fortunes by now.junkml ought to be getting tired of karma fortunes by now.junkml ought to be getting tired of karma fortunes by now.junkml ought to be getting tired of karma fortunes by now.junkml ought to be getting tired of karma fortunes by now.junkml ought to be getting tired of karma fortunes by now.junkml ought to be getting tired of karma fortunes by now.junkml ought to be getting tired of karma fortunes by now.junkml ought to be getting tired of karma fortunes by now.junkml ought to be getting tired of karma fortunes by now.junkml ought to be getting tired of karma fortunes by now.
 
junkml's Avatar
 
Posts: 277
Karma: 1004969
Join Date: Mar 2007
Device: Sony Reader
Ah, the unix line endings explains it. I'm not all that familiar with python.

Thanks.
junkml is offline   Reply With Quote
Old 12-30-2008, 10:03 PM   #28
jlbfoot
idiot
jlbfoot began at the beginning.
 
jlbfoot's Avatar
 
Posts: 91
Karma: 16
Join Date: Nov 2008
Location: Grand Cayman
Device: Sony 505, 300, and 650
Are any plug ins available as stated in the first post? How would one go about finding that, or is it something that has to be created by each individual?
jlbfoot is offline   Reply With Quote
Old 01-01-2009, 10:31 AM   #29
junkml
Addict
junkml ought to be getting tired of karma fortunes by now.junkml ought to be getting tired of karma fortunes by now.junkml ought to be getting tired of karma fortunes by now.junkml ought to be getting tired of karma fortunes by now.junkml ought to be getting tired of karma fortunes by now.junkml ought to be getting tired of karma fortunes by now.junkml ought to be getting tired of karma fortunes by now.junkml ought to be getting tired of karma fortunes by now.junkml ought to be getting tired of karma fortunes by now.junkml ought to be getting tired of karma fortunes by now.junkml ought to be getting tired of karma fortunes by now.
 
junkml's Avatar
 
Posts: 277
Karma: 1004969
Join Date: Mar 2007
Device: Sony Reader
I'm trying to figure out how to build a plugin to make a call to the windows(dos) command line, so that when I add a book to calibre I can launch another application (Like Microsoft Word). however, I'm not getting any result when loading a lit file. Anyone have any thoughts? I'm not all that familiar with Python, so it's entirely possible I'm missing something.

The relevant lines I changed from Kovid's example:

file_types = set(['lit']) # The file types that this plugin will be applied to
on_import = True # Run this plugin after import is complete


AND

subprocess.call(r'C:\WINDOWS\system32\cmd.exe /C "C:\Program Files\Microsoft Office\OFFICE11\winword.exe"')

OR

os.system('"C:\Program Files\Microsoft Office\OFFICE11\winword.exe"')


neither the subprocess.call or os.system work.

Last edited by junkml; 01-01-2009 at 10:33 AM.
junkml is offline   Reply With Quote
Old 01-01-2009, 01:23 PM   #30
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,017
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Use subprocess, os.system is deprecated. Try using

Code:
subprocess.call('path to program', shell=True)
kovidgoyal is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calibre GUI behavior between machines phenomshel Calibre 2 08-21-2010 06:28 PM
Editing Capabilities in calibre GJN Calibre 3 12-21-2009 05:59 PM
Calibre 0.6.10 GUI crashes on startup Wagenius Calibre 1 09-03-2009 01:53 AM
Mobi2mobi GUI has died again/New version? AlexBell Kindle Formats 8 12-10-2008 08:13 PM
Calibre GUI crash on convert aapezzuto Calibre 1 08-02-2008 06:39 PM


All times are GMT -4. The time now is 04:03 PM.


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