从两个xml输入文件创建html差异显示。
rfc-xmldiff的Python项目详细描述
在两个RFC XML文件上创建差异
这个程序接受两个包含svg或rfc文档的xml文件,并创建一个html 显示两个文档之间差异的文件。
RFC Editor正在更改的规范输入格式 Internet-Draft和RFC文档有关此过程的更多信息,请参见 在RFC Editor站点的rfc编辑器上。
用法
rfc xmldiff接受一对xml文档作为输入并输出一个html文档。
基本用法:rfc-xmldiff [options] SOURCE1 SOURCE2
选项
The following parameters affect how rfc-xmldiff behaves, however none are required.
Short Long Description ^{tt2}$ ^{tt3}$ purge the cache and exit ^{tt4}$ ^{tt5}$ show the help message and exit ^{tt6}$ ^{tt7}$ don’t use the network to resolve references ^{tt8}$ ^{tt9}$ don’t print anything ^{tt10}$ ^{tt11}$ don’t use the xml2rfc vocabulary when matching ^{tt12}$ ^{tt13}$ print extra information ^{tt14}$ ^{tt15}$ display the version number and exit ^{tt16}$ ^{tt17}$ don’t resolve xi:include elements ^{tt18}$ ^{tt19}$ specify an output filename ^{tt20}$ ^{tt21}$ specify HTML template filename ^{tt22}$ ^{tt23}$ don’t load attribute defaults from the dtd . ^{tt24}$ specify the URL for resources in the template
模板
软件包中安装了两个模板文件:
- single.html - provides just the XML difference between the two files.
- base.html - provides three columns containing the left source files, the XML difference and the right source files. Uses color to highlight changes. This is the default template.
- wdiff.html - provides three columns containing the left source files, the XML difference and the right source files. Uses color and strike throughs to highlight changes.
对于新模板文件,将定义以下变量:
- title - provides a default window title
- body - contains the XML difference HTML
- leftSourceNames - the list of all input files for the left sources
- leftFile - contains the left source files
- rigthSourceNames - the list of all input files for the right sources
- rightFile - contains the right source files
- resource_dir - contains the URL to find the resources. This defaults to the Template directory of the package.
- allScript - contains the contents of resize.js so the resulting html file is self contained.
依赖关系
RFC xmldiff取决于以下包:
- lxml(>;=4.1.1)
- requests(>;=2.5.0)
- rfctools_common(>;=0.5.10)
- cffi(>;=1.0.0)
变更日志
版本0.5.19(8月29日星期四)
- Change source repository
版本0.5.18(8月16日星期五)
- Fix error building paragraphs with ‘li’
- Fix error in JavaScript
- Remove Python 3.4 from the supported list
- Correct problem with writing unicode on Python 2.7
版本0.5.18(8月16日星期五)
- Fix error building paragraphs with ‘li’
- Fix error in JavaScript
- Remove Python 3.4 from the supported list
- Correct problem with writing unicode on Python 2.7