View Single Post
Old 11-15-2016, 10:11 AM   #12
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,885
Karma: 6120478
Join Date: Nov 2009
Device: many
ps, to answer your question, the soup object should work as advertized in sigil_bs4. The changes we make actually fix a few namespace bugs, and add xhtml specific interface routines to the soup object to convert a bs4 tree back to xml and or xhtml.

So no, unless there is a name/namespace clash somehow, Doitsu's code should work.

But please note Doitsu's test plugin (at least the code shown in the second post) will not actually change the file inside Sigil since his demonstration plugin does not save the changes back it just prints them to the screen (there is no bk.writefile call). BTW, the readfile() call needs the manifest id which in this case just happens to be the same as the file name.

Hope something here helps,

KevinH
KevinH is offline   Reply With Quote