Giter Club home page Giter Club logo

rorybot's Introduction

Rorybot: Catch content style guide violations

Rorybot finds style errors by comparing input text against a set of incorrect terms in the retext-shopify repo. Rorybot explains why your word choices are incorrect according to the Shopify content and documentation style guides (for example, "avoid anthropomorphism"), and suggests alternatives.

rorybot logo

You can run rorybot from the command line, or install plugins for the text editors Atom and Sublime Text that check your text as you type.

rorybot command line screenshot

Installing

  1. Make sure you have node.js installed.
  2. Open a Terminal window.
  3. Run npm install -g rorybot to install rorybot, which will also install retext-shopify as a module within rorybot.

If you run into a permissions error, run sudo npm install -g rorybot instead.

Updating

  1. Open a Terminal window.
  2. Run npm update -g rorybot to update rorybot, which will also update retext-shopify.

Using the Atom linter

Install rorybot, then see the readme for linter-rorybot.

Using the Sublime Text linter

Install rorybot, then see the readme for sublimelinter-rorybot.

Using the command line

You can run rorybot from the command line for extra functionality.

Check a specific file

Say example.md contains the following text:

Login to the Shopify Manual to customise the Shopify point of sale application. 

Run rorybot on example.md:

rorybot example.md

This yields:

example.md
1:1-1:9    warning  “Login to” is not Shopify style. Use “log into” instead. (Login is a noun, not a verb.)              login to
1:14-1:28  warning  “Shopify Manual” is not Shopify style. Use “Shopify Help Center” instead. (Incorrect branded name.)  shopify manual
1:32-1:41  warning  “customise” is not Shopify style. Use “customize” instead. (Use American spelling.)                  customise
1:46-1:67  warning  “Shopify point of sale” is not Shopify style. Use “Shopify POS” instead. (Incorrect branded name.)   shopify point of sale

⚠ 4 warnings 

You can run rorybot on any text file type, including Ruby.

Check a directory

When no input files are given to rorybot, it searches for markdown and text files in the current directory.

If you want to search other types of files, you can use wildcards to create your rorybot command.

To search all Ruby files within your current directory, for example, run:

rorybot *.rb

To search all Ruby files recursively within your current directory, run:

rorybot **/*.rb

Write rorybot messages to a file

If you want to write the results of a rorybot check to a file, use the tee command.

rorybot *.rb | tee output.txt

Check a string

If you want to check a string within your terminal:

echo "Login to the Shopify Manual to customise colours in the Shopify point of sale application." | rorybot

Get help

Run rorybot --help for more information. You can also check out Titus Wormer's original alex.js application for info about the API, which we haven't looked into yet.

Contributing

Add rules

See the readme in retext-shopify.

Make changes to rorybot

Create an issue or pull request in this repo.

Make changes to the Atom linter

See the readme for linter-rorybot.

Make changes to the Sublime Text linter

See the readme for sublimelinter-rorybot.

rorybot's People

Contributors

wooorm avatar jeremyhansonfinger avatar adamhollett avatar sindresorhus avatar nwtn avatar shinnn avatar alexgleason avatar anseljh avatar jdalton avatar jules2689 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.