Code Monkey home page Code Monkey logo

dubdiff's Introduction

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 serve

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.