PyPI-Server

X-I-A

Introduction

Current version is a wrap of Google’s project: https://github.com/google/diff-match-patch

  • Installation:

pip install xia-diff-match-patch
  • Usage

apply_patches function takes a series patched files as arguments, sorted by its priorities.

from xia_diff_match_patch import apply_patches

base = "Line 1\n"
a1 = "Line 1\nLine2\n"
a2 = "Line 1\n\nCode 1\nCode 2\nCode 3\n"
a3 = "Line 3\n"

print(apply_patches(base, a1, a2, a3))

Quick start

Prerequisites

  • Python 3.9 or later

  • pip (Python package manager)

Installation under Windows or MacOS

Using the standard pip command:

pip install xia-diff-match-patch

Installation under Linux

Please visit X-I-A for more information

Getting Started

Now that xia-diff-match-patch is installed, you can start using it as any other python package:

import xia-diff-match-patch