View Single Post
Old 02-07-2026, 12:56 PM   #9
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 9,346
Karma: 6686152
Join Date: Nov 2009
Device: many
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)

Last edited by KevinH; 02-07-2026 at 01:32 PM.
KevinH is offline   Reply With Quote