Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 04-28-2012, 09:13 AM   #1
janzamyslny
Junior Member
janzamyslny began at the beginning.
 
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.
janzamyslny is offline   Reply With Quote
Old 04-28-2012, 10:45 AM   #2
kiwidude
Calibre Plugins Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,637
Karma: 2162064
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...
kiwidude is online now   Reply With Quote
Advert
Reply


Forum Jump

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 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


All times are GMT -4. The time now is 08:15 AM.


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