03-30-2018, 09:39 PM | #1 |
Wizard
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. |
03-30-2018, 11:32 PM | #2 |
creator of calibre
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.
|
Advert | |
|
04-01-2018, 03:34 PM | #3 | |
Wizard
Posts: 2,792
Karma: 6990707
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Aura Edition 2 v1, Clara HD
|
Quote:
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? |
|
04-01-2018, 10:18 PM | #4 |
creator of calibre
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. |
04-01-2018, 11:01 PM | #5 |
Grand Sorcerer
Posts: 6,224
Karma: 16536676
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
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
|
Advert | |
|
04-02-2018, 06:14 PM | #6 | |
Wizard
Posts: 2,792
Karma: 6990707
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Aura Edition 2 v1, Clara HD
|
Quote:
|
|
|
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 |