Register Guidelines E-Books Today's Posts Search

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: 2,792
Karma: 6990707
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, 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: 44,563
Karma: 24495948
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
Advert
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: 2,792
Karma: 6990707
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, 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: 44,563
Karma: 24495948
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, 11: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,224
Karma: 16536676
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
Advert
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: 2,792
Karma: 6990707
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


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 03:26 AM
[Conversion Input] Microsoft Doc Input Plugin igi Plugins 76 06-28-2019 05:47 AM
[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 10:41 PM.


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