So, as the question suggests, I am looking for a way to convert epub2 to epub3 using Python.
What I found so far is how to convert PDF documents in EPUB2 using ASPOSE.PDF for Java (in the python wrapper) and using ASPOSE Word Cloud. The next step would be to manually convert it to epub3 using Sigil, Calibre, or epub3-itzer. However, I would like a python script that could do it automatically similarly to the following:
import asposewordscloud
from asposewordscloud import WordsApi
from asposewordscloud.models.requests import ConvertDocumentRequest
app_sid = 'my_app_id'
app_secret = 'my_secret'
words_api = WordsApi(app_sid, app_secret)
with open('rainer_docs.pdf', 'rb') as f:
request = ConvertDocumentRequest(f, format='epub')
result = words_api.convert_document(request)
print('Output filename : {}'.format(result))
I know this is a bit of hacky method, but it worked for me. I would like something similar to this but simply to convert from epub2 to epub3 using python