View Single Post
Old 08-05-2020, 04:23 PM   #36
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: 8,809
Karma: 6000000
Join Date: Nov 2009
Device: many
Hi Doitsu,
Would it work to put back the proper windows line endings before parsing the file?

Does this change to plugin.py work?

Code:
    # process file list                                                                                
    for (man_id, href) in file_list:

        bookpath = bk.id_to_bookpath(man_id)
        print('Processing ', bookpath, '...')
        data = bk.readfile(man_id)

        # add back in proper windows line ends
        if sys.platform.startswith('win'):
            data = data.replace("\n", "\r\n")
KevinH is offline   Reply With Quote