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, 09: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: 886
Karma: 2523853
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Kobo Aura Edition 2, Moto G5
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, 11: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: 33,606
Karma: 10209526
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 offline   Reply With Quote
Old 04-01-2018, 03: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: 886
Karma: 2523853
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Kobo Aura Edition 2, Moto G5
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, 10: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: 33,606
Karma: 10209526
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 offline   Reply With Quote
Old 04-01-2018, 11:01 PM   #5
jackie_w
Wizard
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: 4,610
Karma: 11060000
Join Date: Sep 2009
Location: UK
Device: Sony:PRS-350, Kobo:Aura6"/H2O/GloHD/KA1/ClaraHD/Forma
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 online now   Reply With Quote
Old 04-02-2018, 06: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: 886
Karma: 2523853
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Kobo Aura Edition 2, Moto G5
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 17 02-11-2018 01:40 PM
[Conversion Input] Microsoft Doc Input Plugin igi Plugins 67 08-31-2017 02:54 PM
[Conversion Input] LaTeX Formulas Input Conversion Plugin sevyls Plugins 0 03-23-2015 06:52 AM
Mimetypes icons should be plugin-based (for new input/output plugins, e.g.) SauliusP. Development 5 09-15-2012 02:15 PM
Looking For MHT Input Conversion Plugin FlooseMan Dave Plugins 4 03-30-2010 06:52 PM


All times are GMT -4. The time now is 06:30 PM.


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