Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Jordan Suchow authored and laraross committed Sep 27, 2015
1 parent 2fcc8ab commit 8c3bae7
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 7 deletions.
8 changes: 8 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
Work on proselint happens over at http://github.com/suchow/proselint. To contribute, create a new branch off of master and then open a pull request. You code should run cleanly through pep8 and pep257 linters. Comments, bug reports, and other feedback can be provided through GitHub issues.

To create a new check:
0. Pick a name for your check, e.g., `misc.abc_checkname`.
1. Create a copy of `checks/inprogress/example_check.py`, renaming it to `abc_checkname.py` and placing it in `checks/misc/`.
2. Edit your check.
3. Create a new test file `test_abc_checkname.py` and place it in `tests`.
4. Run the test suite using `nosetests`.
5. Submit a pull request to suchow/proselint.
71 changes: 64 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,69 @@

`proselint` places the world's greatest writers and editors by your side, where they whisper suggestions on how to improve your prose.

### Installation

To get this up and running as a command line utility, run `python setup.py develop` from inside the root directory.

## Creating a new check
0. Pick a name for your check, e.g., `abc_checkname`.
1. Create a copy of `checks/inprogress/example_check.py`, renaming it `abc_checkname.py` and placing it in `checks/inprogress/`.
2. Edit your check.
3. Create a new test file `test_abc_checkname.py` and place it in `tests`.
4. Run the test suite using `nosetests`.
5. Submit a pull request to suchow/proselint.
```
$ python setup.py develop
```

### API

```js
proselint --json
```

The output is a JSON structure with the following format:

```js
{
// Type of check that output this suggestion
check: "wallace.uncomparables",

// Level of importance
// "suggestion", "warning", "error"
level: "warning",

// Line where the error occurred.
line: 0,

// Column where the error occurred.
column: 10,

// Index in the text
start: 10,

// Size of the section in the text
end: 2,

// Message to describe the suggestion
message: "Comparison of an uncomparable: 'very unique' is not comparable.",

// Replacements suggestion
replacements: [
{
value: ""
}
]
}
```

### Checks

You can disable any of the checks by modifying `.proselintrc`.

| ID | Description |
| ----- | --------------- |
| `passive` | Checks for passive voice |
| `lexical-illusion` | Checks for lexical illusions – cases where a word is repeated. |
| `so` | Checks for `so` at the beginning of the sentence. |
| `adverbs` | Checks for adverbs that can weaken meaning: really, very, extremely, etc. |
| `readibility` | Checks for readibility of sentences. |
| `simplicity` | Checks for simpler expressions |
| `weasel` | Checks for "weasel words." |

### Contributing

We'd love to accept your patches and contributions to improve `proselint`. Learn more about how to contribute in [CONTRIBUTING.md](./CONTRIBUTING.md).

0 comments on commit 8c3bae7

Please sign in to comment.