hason / pandiff

Prose diffs for any document format supported by Pandoc

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PanDiff

Features

Installation

First install Pandoc and npm, then run:

npm install -g pandiff

Usage

pandiff test/old.md test/new.md
{~~Old~>New~~} Title
====================

{--![image](minus.png)--}

{++![image](plus.png)++}

1.  Lorem ipsum dolor {++sit ++}amet
2.  {++[consectetur adipiscing
elit](https://en.wikipedia.org/wiki/Lorem_ipsum)++}
3.  Lorem{-- ipsum--} dolor sit amet

I really love *italic {~~fonts~>font-styles~~}* {~~here.~>there.~~}

``` diff
 print("Hello")
-print("world.")
+print("world!")
 print("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt")
```

Don’t go around saying {--to people that --}the world owes you a
living. The world owes you nothing. It was here first. {~~One~>Only
one~~} thing is impossible for God: To find{++ any++} sense in any
copyright law on the planet. Truth is stranger than fiction, but it is
because Fiction is obliged to stick to possibilities; Truth isn’t.

Git integration

Configure git by running the following commands:

git config --global difftool.pandiff.cmd 'pandiff "$LOCAL" "$REMOTE"'
git config --global alias.pandiff 'difftool -t pandiff'

Now you can use git pandiff wherever you would usually use git diff.

HTML output

pandiff old.md new.md -s -o diff.html

PDF output

pandiff old.md new.md -o diff.pdf

Word Track Changes

pandiff old.md new.md -o diff.docx
pandiff test/track_changes_move.docx
Here is some text.

{++Here is the text to be moved.++}

Here is some more text.

{--Here is the text to be moved.--}

About

Prose diffs for any document format supported by Pandoc

License:MIT License


Languages

Language:HTML 44.8%Language:JavaScript 34.7%Language:TeX 19.6%Language:CSS 0.9%