GithubHelp home page GithubHelp logo

stephenostermiller / stack-exchange-auto-editor Goto Github PK

View Code? Open in Web Editor NEW

This project forked from astrocb/stack-exchange-editor-toolkit

0.0 0.0 0.0 568 KB

Fixes common grammar and usage errors in Stack Exchange posts with the click of a button.

License: MIT License

JavaScript 92.53% Shell 6.13% Python 1.33%

stack-exchange-auto-editor's Introduction

Stack Exchange Auto Editor Stack Exchange Auto Editor Logo

About

This user script adds a button when editing Stack Exchange sites that automatically fixes many common grammar, spelling, capitalization, and usage errors.

Installation

  1. Install a user script extension (such as Tampermonkey) for your browser. Greasy Fork maintains a list of user script extensions that are available for various browsers.
  2. Click here to install editor.user.js within your user script manager.

Usage

  1. Edit a post or a comment on a Stack Exchange site.
  2. Click the Auto Editor button that appears in the toolbar for posts or below comments.
  3. The edit area will flash green if edits were automatically made, red if no edits were needed.
  4. Click the same button again to get a report of what changed, see diffs, and view the status of the unit tests.
  5. Submit the edits to Stack Exchange after making other manual edits as desired.

⚠️ This tool sometimes suggests edits that make posts worse. You are responsible for manually reviewing all edits. Auto-edit rules are created from heuristics and regular expressions and they are not infallible. This tool is designed to save you effort by doing the right thing 90% of time. Bad auto-edits will need to be manually fixed or abandoned. All edits will have your name attached to them, so you don't want to blindly trust this tool.

Rules

This script performs the following actions automatically:

  • Corrects commonly misspelled words such as "untill" → "until"
  • Capitalizes commonly used technologies names and acronyms such as "javascript" → "JavaScript"
  • Fixes contractions with a missing apostrophe such as such as "dont" → "don't"
  • Ensures the title starts with a capital letter but is not all caps.
  • Removes niceties such as "hello", "thanks", and "please help"
  • Removes "Edit:"
  • Code format HTML tags not allowed in markdown
  • Replaces domain names like "mydomain", "abc" or "foo" that have a real top level domain with officially approved example domains like example.com. When multiple different example domains are used, the replacements will use the .example top level domain which is also reserved for example usage.
  • Applies code formatting to example URLs and file names

To minimize false-auto-corrections, these rules are markdown-aware. For example, spelling corrections are not applied inside code blocks or URLs. Each rule has a list of places where it should be applied.

The rules are coded into the source code for the script. To change the rules, you would need to edit it.

stack-exchange-auto-editor's People

Contributors

stephenostermiller avatar astrocb avatar sathyabhat avatar nwinkler avatar dependabot[bot] avatar unihedro avatar tiny-giant 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.