From 95e2170c7b003f29d2e998b6e57fc11ae6a6d018 Mon Sep 17 00:00:00 2001 From: Adam Brown Date: Fri, 2 Dec 2016 17:29:40 -0500 Subject: [PATCH] update readme --- .gitignore | 2 +- README.md | 70 +++++++++++++++++-- data/comp-123.json | 1 - ...-367e05cc-3c82-4ed4-8325-89b5fef33dfa.json | 1 - ...-5ba17f67-08cc-4ee3-ad29-ab040fa2d396.json | 1 - ...-xxxxxxxx-3c82-4ed4-8325-89b5fef33dfa.json | 1 - ...-2e1a606a-04b2-4c64-a86d-28f58007919b.json | 1 - ...-xxxxxxxx-04b2-4c64-a86d-28f58007919b.json | 1 - 8 files changed, 64 insertions(+), 14 deletions(-) delete mode 100644 data/comp-123.json delete mode 100644 data/comp-367e05cc-3c82-4ed4-8325-89b5fef33dfa.json delete mode 100644 data/comp-5ba17f67-08cc-4ee3-ad29-ab040fa2d396.json delete mode 100644 data/comp-xxxxxxxx-3c82-4ed4-8325-89b5fef33dfa.json delete mode 100644 data/id-2e1a606a-04b2-4c64-a86d-28f58007919b.json delete mode 100644 data/id-xxxxxxxx-04b2-4c64-a86d-28f58007919b.json diff --git a/.gitignore b/.gitignore index 8d9882b..2717b4d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ *~ node_modules - +data/* # have to add the bundle to version control so deployment with git subtree works # browser-bundle.js diff --git a/README.md b/README.md index 4739779..ed966f2 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,69 @@ -## Math +# dubdiff -http://www.geog.ucsb.edu/ideas/Insolation.html +A diff viewer for markdown-formatted and plaintext documents. -## Libraries +These diffs are intended for use in copy-editing. The diffs are performed word-by-word, similarly to how the [GNU `wdiff`](http://www.gnu.org/software/wdiff/) tool works. This produces a more meaningful diff for English-language editing. -https://www.npmjs.com/package/suncalc +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). -## Tools - -http://www.sunearthtools.com/dp/tools/pos_sun.php +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 + - 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 distribution server: + + npm run build:dist + npm run server:dist + + + +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](https://www.digitalocean.com/community/tutorials/how-to-configure-virtual-memory-swap-file-on-a-vps#2) + + +### Start on boot + +To make the application start on boot, run the following: + + pm2 start grunt --name dubdiff -- serve:dist + pm2 startup systemd + pm2 save + + [Digital Ocean: How To Set Up a Node.js Application for Production on Ubuntu 16.04](https://www.digitalocean.com/community/tutorials/how-to-set-up-a-node-js-application-for-production-on-ubuntu-16-04) + diff --git a/data/comp-123.json b/data/comp-123.json deleted file mode 100644 index 8f1ea65..0000000 --- a/data/comp-123.json +++ /dev/null @@ -1 +0,0 @@ -{"a":"this is before","b":"this is after","id":"123"} diff --git a/data/comp-367e05cc-3c82-4ed4-8325-89b5fef33dfa.json b/data/comp-367e05cc-3c82-4ed4-8325-89b5fef33dfa.json deleted file mode 100644 index 224beb7..0000000 --- a/data/comp-367e05cc-3c82-4ed4-8325-89b5fef33dfa.json +++ /dev/null @@ -1 +0,0 @@ -{"a":"this is string 1","b":"this is string 2","id":"367e05cc-3c82-4ed4-8325-89b5fef33dfa"} diff --git a/data/comp-5ba17f67-08cc-4ee3-ad29-ab040fa2d396.json b/data/comp-5ba17f67-08cc-4ee3-ad29-ab040fa2d396.json deleted file mode 100644 index 308d46f..0000000 --- a/data/comp-5ba17f67-08cc-4ee3-ad29-ab040fa2d396.json +++ /dev/null @@ -1 +0,0 @@ -{"a":"this is another before","b":"this is another after","id":"5ba17f67-08cc-4ee3-ad29-ab040fa2d396"} diff --git a/data/comp-xxxxxxxx-3c82-4ed4-8325-89b5fef33dfa.json b/data/comp-xxxxxxxx-3c82-4ed4-8325-89b5fef33dfa.json deleted file mode 100644 index d7a0a86..0000000 --- a/data/comp-xxxxxxxx-3c82-4ed4-8325-89b5fef33dfa.json +++ /dev/null @@ -1 +0,0 @@ -{"a":"this is another string 1","b":"this is another string 2","id":"xxxxxxxx-3c82-4ed4-8325-89b5fef33dfa"} diff --git a/data/id-2e1a606a-04b2-4c64-a86d-28f58007919b.json b/data/id-2e1a606a-04b2-4c64-a86d-28f58007919b.json deleted file mode 100644 index 2883f47..0000000 --- a/data/id-2e1a606a-04b2-4c64-a86d-28f58007919b.json +++ /dev/null @@ -1 +0,0 @@ -{"a":"this is string 1","b":"this is string 2","id":"2e1a606a-04b2-4c64-a86d-28f58007919b"} diff --git a/data/id-xxxxxxxx-04b2-4c64-a86d-28f58007919b.json b/data/id-xxxxxxxx-04b2-4c64-a86d-28f58007919b.json deleted file mode 100644 index 222eb1b..0000000 --- a/data/id-xxxxxxxx-04b2-4c64-a86d-28f58007919b.json +++ /dev/null @@ -1 +0,0 @@ -{"a":"this is string 1","b":"this is string 2","id":"xxxxxxxx-04b2-4c64-a86d-28f58007919b"}