Create an HTML difference display from two XML input files.
Project description
Create a difference on two RFC XML files
========================================
This program takes two XML files containing SVG or RFC documents and creates an HTML
file which shows the differences between the two documents.
The `RFC Editor`_ is in the process of changing the canonical input format of
Internet-Draft_ and RFC_ documents. Further information on the process can be found
on the RFC Editor at the `RFC Editor`_ site.
.. _Internet-Draft: https://en.wikipedia.org/wiki/Internet_Draft
.. _RFC: https://en.wikipedia.org/wiki/Request_for_Comments
.. _RFC Editor: https://www.rfc-editor.org
Usage
=====
rfc-xmldiff accepts a pair of XML documents as input and outputs an HTML document.
**Basic Usage**: ``rfc-xmldiff [options] SOURCE1 SOURCE2``
**Options**
The following parameters affect how rfc-xmldiff behaves, however none are required.
=============== | ======================= | ==================================================
Short | Long | Description
=============== | ======================= | ==================================================
``-C`` | ``--clear-cache`` | purge the cache and exit
``-h`` | ``--help`` | show the help message and exit
``-N`` | ``--no-network`` | don't use the network to resolve references
``-q`` | ``--quiet`` | don't print anything
``-r`` | ``--raw`` | don't use the xml2rfc vocabulary when matching
``-v`` | ``--verbose`` | print extra information
``-V`` | ``--version`` | display the version number and exit
``-X`` | ``--no-xinclude`` | don't resolve xi:include elements
``-o FILENAME`` | ``--out=FILENAME`` | specify an output filename
``-t FILENAME`` | ``--template=FILENAME`` | specify HTML template filename
| ``--resource-url=URL`` | specify the URL for resources in the template
=============== | ======================= | ==================================================
Templates
=========
Two template files are installed with the package:
* single.html - provides just the XML difference between the two files. This is the default template
* base.html - provides three columns containing the left source files, the XML difference and the right source files.
For new template files, the following variables are define:
* title - provides a default window title
* body - contains the XML difference HTML
* leftFile - contains the left source files
* rightFile - contains the right source files
* resource_dir - contains the URL to find the resources. This defaults to the Template directory of the package.
Dependencies
============
rfc-xmldiff depends on the following packages:
* lxml_ *(>= 4.1.1)*
* requests_ *(>= 2.5.0)*
* `rfctools_common`_ *(>= 0.5.3)*
* cffi_ *(>= 1.0.0)*
.. _lxml: http://lxml.de
.. _requests: http://docs.python-requests.org
.. _rfctools_common: https://pypi.python.org/pypi/pip
.. _cffi: https://pypi.python.org/pypi/pip
Changelog
=========
Version 0.5.3 (Thur 25 Apr)
------------------------------------------------
* Move resize javascript into a separate file
* Move debuging output to being a note so it is not always emitted
* Fix the fact that half of the command line options are missing
* Add missing items from the manifest to make the html work correctly.
Version 0.5.1 (Sun 28 Feb)
------------------------------------------------
* Tag artwork and sourcecode correctly so that they are formatted as space preserving.
* Emit the xml declaration and DOCTYPE declaration
* Switch to a new tree paradigm as the old one did not allow needed cut and paste features.
* Implement a button to just open modified nodes
* Setup to have and be able to select from multiple HTML templates.
Version 0.5.0 (Sun 25 Feb)
------------------------------------------------
* Many different css changes applied. Changes include: resize the different columns,
add background coloration, wrap lines and make the tree leafs of variable height,
change the charset to allow Utf-8 characters. Long term should point to the column change code,
but currently I don't know of a good place.
* Format paragraphs as a single node in the tree rather than spreading them out over the tree
structure. This improves readability substantially.
* Force the matching of some v2 and v3 elements which provide equivalent functionality, but have
different names.
* Include comments as nodes in the displayed tree.
* Fix some errors in the tree merging code so that elements are placed in the correct location.
* Need to separate the left/right class tagging from the li element as it gets clobbered by the
tree code. Thus the addition of span elements all over the place.
* Clean up some memory leaks in the distance algorithm.
========================================
This program takes two XML files containing SVG or RFC documents and creates an HTML
file which shows the differences between the two documents.
The `RFC Editor`_ is in the process of changing the canonical input format of
Internet-Draft_ and RFC_ documents. Further information on the process can be found
on the RFC Editor at the `RFC Editor`_ site.
.. _Internet-Draft: https://en.wikipedia.org/wiki/Internet_Draft
.. _RFC: https://en.wikipedia.org/wiki/Request_for_Comments
.. _RFC Editor: https://www.rfc-editor.org
Usage
=====
rfc-xmldiff accepts a pair of XML documents as input and outputs an HTML document.
**Basic Usage**: ``rfc-xmldiff [options] SOURCE1 SOURCE2``
**Options**
The following parameters affect how rfc-xmldiff behaves, however none are required.
=============== | ======================= | ==================================================
Short | Long | Description
=============== | ======================= | ==================================================
``-C`` | ``--clear-cache`` | purge the cache and exit
``-h`` | ``--help`` | show the help message and exit
``-N`` | ``--no-network`` | don't use the network to resolve references
``-q`` | ``--quiet`` | don't print anything
``-r`` | ``--raw`` | don't use the xml2rfc vocabulary when matching
``-v`` | ``--verbose`` | print extra information
``-V`` | ``--version`` | display the version number and exit
``-X`` | ``--no-xinclude`` | don't resolve xi:include elements
``-o FILENAME`` | ``--out=FILENAME`` | specify an output filename
``-t FILENAME`` | ``--template=FILENAME`` | specify HTML template filename
| ``--resource-url=URL`` | specify the URL for resources in the template
=============== | ======================= | ==================================================
Templates
=========
Two template files are installed with the package:
* single.html - provides just the XML difference between the two files. This is the default template
* base.html - provides three columns containing the left source files, the XML difference and the right source files.
For new template files, the following variables are define:
* title - provides a default window title
* body - contains the XML difference HTML
* leftFile - contains the left source files
* rightFile - contains the right source files
* resource_dir - contains the URL to find the resources. This defaults to the Template directory of the package.
Dependencies
============
rfc-xmldiff depends on the following packages:
* lxml_ *(>= 4.1.1)*
* requests_ *(>= 2.5.0)*
* `rfctools_common`_ *(>= 0.5.3)*
* cffi_ *(>= 1.0.0)*
.. _lxml: http://lxml.de
.. _requests: http://docs.python-requests.org
.. _rfctools_common: https://pypi.python.org/pypi/pip
.. _cffi: https://pypi.python.org/pypi/pip
Changelog
=========
Version 0.5.3 (Thur 25 Apr)
------------------------------------------------
* Move resize javascript into a separate file
* Move debuging output to being a note so it is not always emitted
* Fix the fact that half of the command line options are missing
* Add missing items from the manifest to make the html work correctly.
Version 0.5.1 (Sun 28 Feb)
------------------------------------------------
* Tag artwork and sourcecode correctly so that they are formatted as space preserving.
* Emit the xml declaration and DOCTYPE declaration
* Switch to a new tree paradigm as the old one did not allow needed cut and paste features.
* Implement a button to just open modified nodes
* Setup to have and be able to select from multiple HTML templates.
Version 0.5.0 (Sun 25 Feb)
------------------------------------------------
* Many different css changes applied. Changes include: resize the different columns,
add background coloration, wrap lines and make the tree leafs of variable height,
change the charset to allow Utf-8 characters. Long term should point to the column change code,
but currently I don't know of a good place.
* Format paragraphs as a single node in the tree rather than spreading them out over the tree
structure. This improves readability substantially.
* Force the matching of some v2 and v3 elements which provide equivalent functionality, but have
different names.
* Include comments as nodes in the displayed tree.
* Fix some errors in the tree merging code so that elements are placed in the correct location.
* Need to separate the left/right class tagging from the li element as it gets clobbered by the
tree code. Thus the addition of span elements all over the place.
* Clean up some memory leaks in the distance algorithm.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
rfc-xmldiff-0.5.3.tar.gz
(31.1 kB
view hashes)