View Single Post
Old 10-07-2022, 02:16 PM   #1
paparazzoreader
Junior Member
paparazzoreader began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Aug 2022
Device: none
OutputFormatPlugin and file_type with modified.epub

Hello,

I am trying to write an OutputFormatPlugin that uses EPUBOutput to generate an epub, but it then modifies that epub slightly with some additional content. I have based my approach on the kepub output plugin and successfully developed the desired output. The output extension/format should be an epub.

My current challenge is that I would like to generate an epub but not override the existing epub plugin, allowing the user to choose the existing epub plugin or a "modified epub" plugin, even though the output file would be an epub file with an epub extension (like "Mybook.epub/mobi" converted to "Mybook.modified.epub")

All my code is running, but when developing the PluginWidget, I realized that the gui_configuration_widget method of my plugin does not get called when file_type has a dot in its string (ex: file_type = "modified.epub")

To overcome this, I have attempted to "rename" the file before exiting the convert method, but without success.
Any clue about alternative approaches?
thank you
paparazzoreader is offline   Reply With Quote