|04-28-2012, 09:13 AM||#1|
Join Date: Apr 2012
Using external application (or library) as calibre plugin
1st - I'm sorry for bothering you, but I'm rather fresh user of calibre and it's plugins.
I need to run external application, transfer filename to it, perform some action and transfer results back to calibre. I'm not familiar with python, but I read source of Open With plugin and realised how to do first 2 steps (open, transfer filename as argument). But I'm stack with the last one. I have some programs written by me and I'd like to use it as extension for Calibre (I'm fresh green in python and i'ts too complicated to rewrite it for me). Programs give result inline, but it's no problem for me to add other way for communication (f.e. as export function in dll). Which way will be the best and simplest for calibre? How shoud look adequate fragment of py code? Or which other plugin has such functionality?
Can anyone help me, please?
Thanks for your help, regards.
|04-28-2012, 10:45 AM||#2|
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
Absolute simplest approach (assuming you are talking out of process non Python executable you are calling) would be to write the result to a temp file. I would have the calling code in calibre create the temp file using calibre's temp file functions, pass the filename to your process along with whatever other data it needs, it writes to the file and exits, then the calibre code reads the file for the result.
Simpler than heading down the route of IPC using named pipes or whatever...
|Thread Tools||Search this Thread|
|Thread||Thread Starter||Forum||Replies||Last Post|
|Can Calibre's conversion modules be used in an external console application?||stodge||Calibre||6||03-23-2011 08:23 PM|
|New Plugin Type Idea: Library Plugin||cgranade||Plugins||3||09-15-2010 12:11 PM|
|Request Library with external storage||ckole||enTourage Archive||9||04-19-2010 11:36 PM|
|Plugin for external converters||jjje555||Plugins||2||12-20-2009 12:27 PM|
|looking for library application for iphone.||nwinter||Apple Devices||2||02-22-2009 09:16 PM|