Code Monkey home page Code Monkey logo

proofreader's Introduction

Proofreader Build Status npm version

Proofreader takes a website, or a local file, and tries to proofread it using write-good and nodehun.

Installation

npm install proofreader -g

Examples

proofreader -u https://raw.githubusercontent.com/GoogleChrome/devtools-docs/master/docs/memory-analysis-101.html
proofreader -f ../devtools-docs/docs/commandline-api.md
proofreader -l list-of-files.txt
proofreader -c custom-config.json -f file.html

Output: Console output

  • blue suggestions come from write-good
  • magenta suggestions come from nodehun

Options

Proofreader can handle both HTML and Markdown files. It distinguishes between these two using MIME types.

--url (-u)

Downloads and processes single remote file from given URL.

--file (-f)

Processes single local file from given path.

--file-list (-l)

Processes all sources listed in the provided file. Sample list file:

../docs/file.html
/home/developer/otherfile.md
http://localhost/remote-file.md

--config-file (-c)

Path to a custom configuration file (default one is in settings.json). This file has to be a valid JSON. Sample configuration:

{
  "dictionaries": {
    "build-in": ["en_US", "en_GB"],
    "custom": ["devtools-docs.dic"]
  },
  "selectors": {
    "whitelist": "p, li, h1, h2, h3, h4, th, td, dl, figcaption",
    "blacklist": "pre, code"
  },
  "write-good": {
    "weasel": false
  }
}
  • dictionaries
    • build-in - one or two of build in dictionaries (eng_GB, eng_US). E.g. when both American English and British English are allowed, ["en_US", "en_GB"] should be specified.
    • custom - list of custom dictionaries
  • selectors
    • whitelist - CSS selector that specifies all elements that should be processed. This also applies to Markdown which is compiled to HTML before processing.
    • blacklist - All elements that match this CSS selector will be removed before proofreading.
    • write-good - Additional settings for write-good (more details here).

Notes

Please note that this project was:

  • optimized for Chrome DevTools docs
  • optimized for HTML and Markdown
  • optimized for English
  • by default does not process all the tags, only whitelisted ones (e.g. P, LI, H1, H2, H3)

proofreader's People

Contributors

kdzwinel avatar thrillberg avatar

Watchers

James Cloos avatar

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.