Replies: 2 comments 1 reply
-
I may add EPUB support, but it won't be through an external Python package. I want to avoid having to deal with dependencies outside the bare minimum. At present, the recommended way to generate EPUB is to do it from either Markdown or HTML using Calibre or Pandoc. I'm not entirely sure about the process as I don't really work with EPUB. It is also a little out of scope for novelWriter, since the purpose of it is to generate a manuscript, and EPUB is more of a publishing format. Although I see there are use cases for EPUB in between these boundaries. In any case, please create a feature request for it, and I will consider it. There's no need for the example code as none of it is relevant to how novelWriter handles output formats or how they are integrated into the UI. The correct way is to subclass the |
Beta Was this translation helpful? Give feedback.
-
May I remark that LibreOffice can export Epub out of the box? |
Beta Was this translation helpful? Give feedback.
-
I would for the ability to export EPUBs. I believe that you'll need to incorporate a module or script that can handle EPUB creation and integrate it with novelWriter's existing export functionality. This can be done by:
pip install EbookLib
Create a function to generate EPUB: Write a function that takes the content of your novel from novelWriter and exports it as an EPUB file. Below is an example function using ebooklib:
python
Here’s an example of how you might integrate this function in a hypothetical novelWriter codebase:
python
class NovelWriter:
# Existing code...
Example usage
novel_writer = NovelWriter()
novel_writer.export_as_epub()
In this example:
You would need to adapt this code to fit the actual structure and data management of novelWriter.
Beta Was this translation helpful? Give feedback.
All reactions