Skip to content

DBremen/PSDiff

Repository files navigation

PSDiff

PowerShell wrapper + additional functionality around the diff part of https://github.com/google/diff-match-patch

This is using a slightly customized version of the c# version provided in the diff-match-patch repository (mainly replacing protected by public and implementing the suggested line and word modes).

OutConsoleDiff For usage check the documentation and the tests. The PSDiff module exports the following functions:

Function Synopsis Documentation
ConvertFrom-DiffToHtml Convert a diff to hmtl, output to file and open in browser (unless specified) Link
ConvertFrom-DiffToText Converts a diff (output of one of the Get-*Diff commands) to a source (text1) and destination (text2) Link
Get-CharDiff Get a diff of two strings character by character Link
Get-CommonOverlapLength Get the length of a common suffix or prefix overlap for two strings Link
Get-CommonPrefixLength Get the length of a common prefix for two strings Link
Get-CommonSuffixLength Get the length of a common suffix for two strings Link
Get-LineDiff Get a diff of two texts based on lines rather than chars or words Link
Get-WordDiff Get a diff of two texts based on words rather than chars Link
Out-ConsoleDiff Diffs two strings and outputs the results side by side in the console color coded and with line numbers. Link

About

PowerShell wrapper + additional functionality around the diff part of https://github.com/google/diff-match-patch

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published