现在我在 Python 中使用 difflib
来生成不同的 html,
import difflib
htmlcontent =
difflib.HtmlDiff(wrapcolumn=60).make_file(
file_1, file_2, old_file.name, new_file,context=True)
with open(output_file, "w", encoding="utf8", errors='ignore') as f:
f.write(htmlcontent)
问题 UI 不吸引人(UI 将从基于 diff 的 html 文件呈现)。任何使用户界面更具吸引力的建议。或任何其他 python 库是否可以返回包含差异的 html 模板,以及具有吸引力的用户界面,例如在线差异检查器?