xmldiff

A library and command line utility for diffing xml

https://github.com/shoobx/xmldiff

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.8%) to scientific vocabulary

Keywords from Contributors

static-analysis closember code-quality pep8 static-code-analysis
Last synced: 11 months ago · JSON representation

Repository

A library and command line utility for diffing xml

Basic Info
  • Host: GitHub
  • Owner: Shoobx
  • License: mit
  • Language: Python
  • Default Branch: master
  • Homepage:
  • Size: 566 KB
Statistics
  • Stars: 215
  • Watchers: 22
  • Forks: 54
  • Open Issues: 13
  • Releases: 1
Created over 8 years ago · Last pushed about 1 year ago
Metadata Files
Readme Changelog License

README.rst

xmldiff
========

.. image:: https://travis-ci.org/Shoobx/xmldiff.svg?branch=master
  :target: https://travis-ci.org/Shoobx/xmldiff

.. image:: https://coveralls.io/repos/github/Shoobx/xmldiff/badge.svg
  :target: https://coveralls.io/github/Shoobx/xmldiff

``xmldiff`` is a library and a command-line utility for making diffs out of XML.
This may seem like something that doesn't need a dedicated utility,
but change detection in hierarchical data is very different from change detection in flat data.
XML type formats are also not only used for computer readable data,
it is also often used as a format for hierarchical data that can be rendered into human readable formats.
A traditional diff on such a format would tell you line by line the differences,
but this would not be be readable by a human.
``xmldiff`` provides tools to make human readable diffs in those situations.

Full documentation is on `xmldiff.readthedocs.io `_

``xmldiff`` is still under rapid development,
and no guarantees are done that the output of one version will be the same as the output of any previous version.


Quick usage
-----------

``xmldiff`` is both a command-line tool and a Python library.
To use it from the command-line, just run ``xmldiff`` with two input files::

  $ xmldiff file1.xml file2.xml

There is also a command to patch a file with the output from the ``xmldiff`` command::

  $ xmlpatch file.diff file1.xml

There is a simple API for using ``xmldiff`` as a library::

  from lxml import etree
  from xmldiff import main, formatting

  diff = main.diff_files('file1.xml', 'file2.xml',
                         formatter=formatting.XMLFormatter())

There is also a method ``diff_trees()`` that take two lxml trees,
and a method ``diff_texts()`` that will take strings containing XML.
Similarly, there is ``patch_file()`` ``patch_text()`` and ``patch_tree()``::

  result = main.patch_file('file.diff', 'file1.xml')


Changes from ``xmldiff`` 0.6/1.x
--------------------------------

  * A complete, ground up, pure-Python rewrite

  * Easier to maintain, the code is less complex and more Pythonic,
    and uses more custom classes instead of just nesting lists and dicts.

  * Fixes the problems with certain large files and solves the memory leaks.

  * A nice, easy to use Python API for using it as a library.

  * Adds support for showing the diffs in different formats,
    mainly one where differences are marked up in the XML,
    useful for making human readable diffs.

    These formats can show text differences in a semantically meaningful way.

  * An output format compatible with 0.6/1.x is also available.

  * 2.0 is currently significantly slower than ``xmldiff`` 0.6/1.x,
    but this will change in the future.
    Currently we make no effort to make ``xmldiff`` 2.0 fast,
    we concentrate on making it correct and usable.


Contributors
------------

 * Lennart Regebro, regebro@gmail.com (main author)

 * Stephan Richter, srichter@shoobx.com

 * Albertas Agejevas, alga@shoobx.com

 * Greg Kempe, greg@laws.africa

 * Filip Demski, glamhoth@protonmail.com

 * Jacek Chałupka, krunchfrompoland@gmail.com

 * Thomas Pfitzinger, thpfitzinger@web.de

 * Alexandre Detiste

The diff algorithm is based on
"`Change Detection in Hierarchically Structured Information `_",
and the text diff is using Google's ``diff_match_patch`` algorithm.

Owner

  • Name: Shoobx
  • Login: Shoobx
  • Kind: organization

GitHub Events

Total
  • Issues event: 5
  • Watch event: 17
  • Issue comment event: 10
  • Push event: 5
  • Pull request event: 5
  • Fork event: 2
Last Year
  • Issues event: 5
  • Watch event: 17
  • Issue comment event: 10
  • Push event: 5
  • Pull request event: 5
  • Fork event: 2

Committers

Last synced: about 1 year ago

All Time
  • Total Commits: 255
  • Total Committers: 27
  • Avg Commits per committer: 9.444
  • Development Distribution Score (DDS): 0.557
Past Year
  • Commits: 1
  • Committers: 1
  • Avg Commits per committer: 1.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Lennart Regebro r****o@g****m 113
Adam Groszer a****r@g****m 47
Stephan Richter s****r@g****m 25
Alexandre Fayolle a****e@l****r 17
Emile Anclin e****n@l****r 8
Lennart Regebro l****o@f****m 7
Alain Leufroy a****y@l****r 5
Albertas Agejevas a****a@s****m 5
Pierre-Yves David p****d@l****r 4
Graziella Toutoungis g****s@l****r 4
Aurelien Campeas a****s@l****r 3
Nicolas Chauvat n****t@l****r 2
Adewzen a****n@a****z 1
Adrien Di Mascio A****o@l****r 1
ArnaudBienner a****r@g****m 1
Daniel 6****4 1
Filip Demski (Glamhoth) G****h 1
Francesc Elies e****s@p****t 1
Giacomo Lacava g****a@g****m 1
root d****l@l****t 1
Jeremy Lavergne j****e@s****m 1
Greg Kempe g****g@k****t 1
Jeremy Lavergne n****g 1
Jingren Wang 3****r 1
John Vandenberg j****n@c****o 1
Josh Soref j****f 1
Thomas Pfitzinger t****r@w****e 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 11 months ago

All Time
  • Total issues: 79
  • Total pull requests: 55
  • Average time to close issues: 11 months
  • Average time to close pull requests: about 2 months
  • Total issue authors: 67
  • Total pull request authors: 19
  • Average comments per issue: 2.41
  • Average comments per pull request: 1.31
  • Merged pull requests: 44
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 5
  • Pull requests: 7
  • Average time to close issues: 2 months
  • Average time to close pull requests: 29 days
  • Issue authors: 5
  • Pull request authors: 2
  • Average comments per issue: 0.6
  • Average comments per pull request: 0.0
  • Merged pull requests: 6
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • regebro (3)
  • dkg (2)
  • slamer59 (2)
  • happlek (2)
  • ItsCinnabar (2)
  • joedj (2)
  • jbhatt091 (2)
  • rkbala (2)
  • pieterhartel (2)
  • UniMars (2)
  • rishabhgpt (1)
  • doug-rosser (1)
  • breakthewall (1)
  • gnarlyfarley (1)
  • borwickatuw (1)
Pull Request Authors
  • regebro (34)
  • a-detiste (2)
  • haugs2 (2)
  • Tomp0801 (2)
  • Glamhoth (2)
  • toyg (2)
  • rickykim93 (1)
  • jsoref (1)
  • wjrforcyber (1)
  • KRunchPL (1)
  • longhotsummer (1)
  • ArnaudBienner (1)
  • ffe4 (1)
  • slamer59 (1)
  • alga (1)
Top Labels
Issue Labels
enhancement (13) bug (7) upstream (3) waiting for feedback (2) support (1)
Pull Request Labels

Packages

  • Total packages: 10
  • Total downloads:
    • pypi 342,291 last-month
  • Total docker downloads: 15
  • Total dependent packages: 16
    (may contain duplicates)
  • Total dependent repositories: 118
    (may contain duplicates)
  • Total versions: 58
  • Total maintainers: 8
pypi.org: xmldiff

Creates diffs of XML files

  • Versions: 37
  • Dependent Packages: 16
  • Dependent Repositories: 116
  • Downloads: 342,291 Last month
  • Docker Downloads: 15
Rankings
Dependent packages count: 0.7%
Downloads: 0.9%
Dependent repos count: 1.4%
Average: 2.8%
Stargazers count: 5.1%
Forks count: 6.0%
Last synced: 11 months ago
alpine-edge: py3-xmldiff

Creates diffs of XML files

  • Versions: 8
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Average: 12.8%
Dependent packages count: 14.6%
Forks count: 18.1%
Stargazers count: 18.3%
Maintainers (1)
Last synced: 11 months ago
alpine-edge: py3-xmldiff-pyc

Precompiled Python bytecode for py3-xmldiff

  • Versions: 6
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Average: 12.9%
Dependent packages count: 13.4%
Forks count: 18.9%
Stargazers count: 19.2%
Maintainers (1)
Last synced: 11 months ago
conda-forge.org: xmldiff

xmldiff is a library and a command-line utility for making diffs out of XML

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 2
Rankings
Dependent repos count: 20.2%
Stargazers count: 28.8%
Forks count: 29.1%
Average: 32.4%
Dependent packages count: 51.6%
Last synced: 11 months ago
alpine-v3.22: py3-xmldiff-pyc

Precompiled Python bytecode for py3-xmldiff

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 11 months ago
alpine-v3.20: py3-xmldiff

Creates diffs of XML files

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 11 months ago
alpine-v3.21: py3-xmldiff

Creates diffs of XML files

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 11 months ago
alpine-v3.21: py3-xmldiff-pyc

Precompiled Python bytecode for py3-xmldiff

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 11 months ago
alpine-v3.20: py3-xmldiff-pyc

Precompiled Python bytecode for py3-xmldiff

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 11 months ago
alpine-v3.22: py3-xmldiff

Creates diffs of XML files

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 11 months ago

Dependencies

docs/requirements.txt pypi
  • sphinx-argparse ==0.2.2
setup.py pypi
  • lxml >=3.1.0
  • setuptools *
  • six *
.github/workflows/lint.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • pre-commit/action v3.0.0 composite
.github/workflows/test.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite