04-28-2012, 10:13 AM | #1 |
Junior Member
Posts: 1
Karma: 10
Join Date: Apr 2012
Device: Kindle
|
Using external application (or library) as calibre plugin
Hi!
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, 11:45 AM | #2 |
Calibre Plugins Developer
Posts: 4,682
Karma: 2162246
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
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... |
Advert | |
|
|
Similar Threads | ||||
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 09:23 PM |
New Plugin Type Idea: Library Plugin | cgranade | Plugins | 3 | 09-15-2010 01:11 PM |
Request Library with external storage | ckole | enTourage Archive | 9 | 04-20-2010 12:36 AM |
Plugin for external converters | jjje555 | Plugins | 2 | 12-20-2009 01:27 PM |
looking for library application for iphone. | nwinter | Apple Devices | 2 | 02-22-2009 10:16 PM |