A quick and easy diff generator with support for plaintext and formatted diffs of markdown.
Go to file
Mario Voigt e1a0c0f422 FIx in readme 2022-05-18 23:04:27 +02:00
dist fix minor: diff colors, readme, port logging 2016-12-29 13:10:32 -05:00
src respond to browser hash to show markdown/plaintext view 2017-02-05 15:33:55 -05:00
test format to standardjs code style with linting 2017-01-17 20:41:53 -05:00
.babelrc start test suite for dubdiff engine 2016-12-09 18:01:59 -05:00
.gitattributes initial check-in with working wdiff server-side api 2015-02-06 10:46:55 -05:00
.gitignore reset prepatory to merge version 2 2016-12-28 17:07:10 -05:00
LICENSE Initial commit 2015-02-06 10:35:22 -05:00
README.md FIx in readme 2022-05-18 23:04:27 +02:00
TODO.md debug markdown diff output edge cases 2017-01-05 17:18:03 -05:00
package.json format to standardjs code style with linting 2017-01-17 20:41:53 -05:00
webpack.config.js format to standardjs code style with linting 2017-01-17 20:41:53 -05:00

README.md

dubdiff

A diff viewer for markdown-formatted and plaintext documents.

These diffs are intended for use in copy-editing. The diffs are performed word-by-word, similarly to how the GNU wdiff tool works. This produces a more meaningful diff for English-language editing.

The diff may be further processed in a way that is aware of markdown formatting. The resulting output attempts to show differences of copy within the final document format (rather than differences of format).

The markdown-sensitive processing of the wdiff comparison is at ..., for the curious.

Version 2

This is a complete rewrite of Dubdiff with:

  • simpler project architecture
  • client-side diffing engine and simplified server
  • server-side rendering
  • switch to React from Angular
  • clean up of diffing engine
  • goal of implementing a HTML diff viewer

Basically I'm rewriting it for fun.

Live Server

The tool is live at http://dubdiff.com, feel free to use it there.

Provisioning

You'll need node & npm. Then install dependencies with

npm install

To build and launch a dev server:

npm start
npm run server

To build and launch the production server:

npm run build:prod
npm run serve:prod

Data is saved to a simple flat file db in the data folder. If this folder doesn't exist, create it.

mkdir data

Low-memory environments

On a low-memory machine, eg. a DigitalOcean 512MB instance, you will need to enable virtual memory. Use this guide:

How To Configure Virtual Memory (Swap File) on a VPS

Start on boot

To make the application start on boot, run the following:

# initialize pm2 to start on boot with the systemd boot manager
pm2 startup systemd

# start the app with pm2
pm2 start npm --name dubdiff -- run serve:prod

# save the current pm2 config so that it can be reloaded on boot
pm2 save

Digital Ocean: How To Set Up a Node.js Application for Production on Ubuntu 16.04