View Single Post
Old 04-22-2021, 03:07 AM   #407
BeckyEbook
Guru
BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.
 
BeckyEbook's Avatar
 
Posts: 854
Karma: 3341026
Join Date: Jan 2017
Location: Poland
Device: Various
@KevinH: So maybe to avoid the problem after conversion, give a warning about it? It's not about laziness either, but a reminder that there is still "something" to be done before starting the plugin so that everything goes according to plan.

Something like that:
Spoiler:
Code:
    file_list = list(bk.text_iter())
    for (html_id, href) in file_list:
        filename = os.path.basename(href)
        if bk.launcher_version() >= 20190927:
            filename = bk.id_to_bookpath(html_id)

        if not '.xhtml' in filename:
            print("Error: ePub3-itizer requires .xhtml extension for html files")
            print("Change the extension for all html files to .xhtml and run the plugin again")
            return -1
BeckyEbook is offline   Reply With Quote