Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 03-30-2018, 08:39 PM   #1
geek1011
Wizard
geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.
 
Posts: 2,700
Karma: 6254413
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Aura Edition 2 v1, Clara HD
Conversion plugins without input plugin

I am planning on creating a calibre plugin for my epub to kepub conversion tool kepubify. I would like to be able to skip the input plugin stage for epub inputs, so I can keep the fast conversion speeds (kepubify is about 12-30 times faster than the kepub output plugin). Basically, the plugin would run a standalone executable on the epub file, which results in a kepub file.

How should I go about creating this plugin? What type (conversion or just a toolbar button) should I use? And if it is a conversion plugin, how would I skip the input plugin stage for epub files.

I am new to calibre plugin development, but I already know python quite well.

Thanks in advance for the help.
geek1011 is offline   Reply With Quote
Old 03-30-2018, 10:32 PM   #2
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: 43,774
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Conversion plugins are the input stage of the conversion pipeline. If you dont want to do a conversion you can create a user interface plugin.
kovidgoyal is online now   Reply With Quote
Old 04-01-2018, 02:34 PM   #3
geek1011
Wizard
geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.
 
Posts: 2,700
Karma: 6254413
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Aura Edition 2 v1, Clara HD
Quote:
Originally Posted by kovidgoyal View Post
Conversion plugins are the input stage of the conversion pipeline. If you dont want to do a conversion you can create a user interface plugin.
Thanks. I think I will make an interface plugin.

I have a few questions: When I execute kepubify on the source epub, how can I add the output kepub as another format for the book. Also, how can I add something to the jobs queue so it shows as a job?
geek1011 is offline   Reply With Quote
Old 04-01-2018, 09:18 PM   #4
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: 43,774
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You use the database API which is documented in the manual IIRC something like

self.current_db.new_api.add_format(book_id, format, path)

as for how to run jobs just look at one of the existing plugins that does this.
kovidgoyal is online now   Reply With Quote
Old 04-01-2018, 10:01 PM   #5
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,171
Karma: 16228536
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Quote:
Originally Posted by geek1011 View Post
Also, how can I add something to the jobs queue so it shows as a job?
In case it helps, I very recently looked into this for my own purposes. I was able (eventually) to create something workable by examining kiwidude's ExtractISBN plugin, which seemed less complex than some of his other mega-plugins. I expect you'll "get it" quicker than I did
jackie_w is offline   Reply With Quote
Old 04-02-2018, 05:14 PM   #6
geek1011
Wizard
geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.
 
Posts: 2,700
Karma: 6254413
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Aura Edition 2 v1, Clara HD
Quote:
Originally Posted by jackie_w View Post
In case it helps, I very recently looked into this for my own purposes. I was able (eventually) to create something workable by examining kiwidude's ExtractISBN plugin, which seemed less complex than some of his other mega-plugins. I expect you'll "get it" quicker than I did
Thanks. That plugin looks like a good example. I think I understand now. I will probably get around to finishing my plugin by the end of next week if I have time.
geek1011 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Plugin] FolderIn and FolderOut - Folder input and output plugins for Sigil KevinH Plugins 18 11-11-2019 02:26 AM
[Conversion Input] Microsoft Doc Input Plugin igi Plugins 76 06-28-2019 04:47 AM
[Conversion Input] LaTeX Formulas Input Conversion Plugin sevyls Plugins 0 03-23-2015 05:52 AM
Mimetypes icons should be plugin-based (for new input/output plugins, e.g.) SauliusP. Development 5 09-15-2012 01:15 PM
Looking For MHT Input Conversion Plugin FlooseMan Dave Plugins 4 03-30-2010 05:52 PM


All times are GMT -4. The time now is 10:23 AM.


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