本文介绍了diff到html(diff2html)程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一个diff to html程序,它会从给定的diff / patch文件生成一个静态html页面。



我已经使用了Google当然,除了我发现的一些脚本之外,没有真正的项目(例如Debian / Ubuntu中没有包)。

我错过了什么吗?你可以推荐任何东西吗?

解决方案

您可以使用,它可以从统一的差异输入中创建静态html页面中的并排比较。脚本是用python写的。

  cat foo.diff | python diff2html.py> foo.html 


I'm looking for a "diff to html" program, which would generate a static html page from a given diff/patch file.

I've googled for it of course, but apart from some scripts I've found there's no "real project" (e.g. no package in Debian/Ubuntu).

Have I missed something? Can you recommend anything?

解决方案

You can use diff2html.py that is able to create a side-by-side diff in a static html page, from an unified diff input. The script is written in python.

cat foo.diff | python diff2html.py > foo.html

这篇关于diff到html(diff2html)程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-10 23:47