View Single Post
Old 02-07-2026, 06:08 PM   #10
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,790
Karma: 24088595
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by KevinH View Post
So hopefully the following change is a bit simpler and should make things work too (but I have not tested this). It just adds the desired output epub path/name as the final argument to the jar.

Code:
    # process ODT file                                                                                                          
    if odt_file:

        # assemble w2l command line                                                                                             
        args = ['java', '-jar', w2l_path, '-' + output_format]
        if os.path.isfile(w2l_config_path):
            args.append('-config=' + w2l_config_path)
        if os.path.isfile(w2l_css_path):
            args.append('-stylesheet=' + w2l_css_path)
        args.append(odt_file)
        epub_path = os.path.splitext(odt_file)[0] + '.epub'
        args.append(epub_path)

        # run w2l                                                                                                               
	result = w2lWrapper(*args)
Thanks for the code!!!
I've just tested it and it works fine.

Since the current version is looking for custom user files only in the plugin folder, I'll try to update the plugin to also look in the preferences folder for these files.

Last edited by Doitsu; 02-07-2026 at 06:16 PM.
Doitsu is offline   Reply With Quote