# vnproofer

> Command line Visual Novel Proofreading tool

Latest version **1.0.11** (published 2021-05-19) · ISC license · 0 weekly downloads

## Install

```sh
npm install vnproofer
pnpm add vnproofer
yarn add vnproofer
bun add vnproofer
```

Provides the commands `vnp`, `vnproofer`.

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.11 |
| Published | 2021-05-19 |
| First published | 2021-05-11 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 12 |
| Unpacked size | 35 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Author | Chris Gruel \| cgruel@gmail.com |
| Maintainers | devorbitus |
| Keywords | command-line, renpy, grammar, gramma, cspell |

## Links

- npm: https://www.npmjs.com/package/vnproofer
- Repository: https://github.com/devorbitus/vnproofer
- Homepage: https://github.com/devorbitus/vnproofer#readme
- Issues: https://github.com/devorbitus/vnproofer/issues
- npm.io page: https://npm.io/package/vnproofer

## Dependencies (12)

- [kleur](https://npm.io/package/kleur.md) ^3.0.3
- [yargs](https://npm.io/package/yargs.md) ^17.0.1
- [prompts](https://npm.io/package/prompts.md) ^2.4.1
- [shelljs](https://npm.io/package/shelljs.md) ^0.8.4
- [read-pkg](https://npm.io/package/read-pkg.md) ^6.0.0
- [node-fetch](https://npm.io/package/node-fetch.md) ^2.6.1
- [parse-diff](https://npm.io/package/parse-diff.md) ^0.8.1
- [insert-line](https://npm.io/package/insert-line.md) ^1.1.0
- [line-number](https://npm.io/package/line-number.md) ^0.1.0
- [cli-progress](https://npm.io/package/cli-progress.md) ^3.9.0
- [update-notifier](https://npm.io/package/update-notifier.md) ^5.1.0
- [escape-string-regexp](https://npm.io/package/escape-string-regexp.md) ^2.0.0

## Recent versions

- 1.0.11 (latest) — 2021-05-19
- 1.0.10 — 2021-05-19
- 1.0.9 — 2021-05-17
- 1.0.8 — 2021-05-14
- 1.0.7 — 2021-05-14
- 1.0.6 — 2021-05-14
- 1.0.5 — 2021-05-14
- 1.0.4 — 2021-05-14
- 1.0.3 — 2021-05-13
- 1.0.2 — 2021-05-11
- 1.0.0 — 2021-05-11

## README

# VNProofer
VNProofer is a Command-line Ren'Py Visual Novel proofreading tool.

<!-- TOC -->
- [Features](#features)
- [Requirements](#requirements)
- [Installation](#installation)
  - [Via NPM](#via-npm)
    - [Global installation:](#global-installation)
- [Usage](#usage)
  - [Help Menu](#help-menu)
  - [Config](#config)
    - [Config Command](#config-command)
    - [Config Help](#config-help)
      - [Sub Commands](#sub-commands)
        - [Initial Config](#initial-config)
        - [Update character exclusions](#update-character-exclusions)
  - [Check](#check)
    - [Check Command](#check-command)
  - [All](#all)
    - [All Command](#all-command)
    - [All Help](#all-help)
  - [Counts](#counts)
    - [Counts Command](#counts-command)
    - [Counts Help](#counts-help)
  - [Exclude](#exclude)
    - [Exclude Command](#exclude-command)
    - [Exclude Help](#exclude-help)
- [Todo](#todo)
<!-- /TOC -->

## Features
 - Ability to generate a cSpell configuration file for the Ren'Py visual novel
    - Character names are automatically added to the local dictionary
 - Ability to automatically add newly added characters to the local dictionary
 - Ability to count both words added and dialogue words added today by examining git commit history
 - Ability to add words misspelled on purpose to file level exclusion list

## Requirements
 - A copy of cspell must have been installed globally `npm i cspell -g` to do any spell checking
 - VNProofer is designed to work with a codebase of `*.rpy` files in any directory structure from the root.
    - `*.rpa` files will need to be decompressed
    - `*.rpyc` files will need to be decompressed

## Installation

### Via NPM

It would be best to have Node.js and NPM already installed (or you are willing to do it).

#### Global installation:

```
npm i vnproofer cspell -g
```

## Usage

### Help Menu

Use either `-h` or `--help` at any level
```
vnproofer --help
vnproofer -h
vnproofer config --help
vnproofer check --help
vnproofer all -h
```

### Config

Displays the configuration menu

#### Config Command
```
vnproofer config
```
#### Config Help
```
$ vnproofer config --help
vnproofer config

Configure vnproofer

Options:
  -v, --version         Show version number                                      [boolean]
  -s, --suppress-intro  Suppress intro of command               [boolean] [default: false]
  -h, --help            Show help                                                [boolean]
```

##### Sub Commands

###### Initial Config

Create an initial cspell.json file from a template (disabled if it already exists). VNProofer will automatically add any defined character names to the workspace dictionary list.

###### Update character exclusions

Add any new characters to the workspace dictionary list that were not previously added.

### Check

Check an individual file for spelling errors

#### Check Command
```
vnproofer check ./myfile.rpy
```
or
```
vnproofer c ./myfile.rpy
```

### All

Perform a complete spell check of all rpy files using cSpell

#### All Command
```
vnproofer all
```
or
```
vnproofer a
```

#### All Help
```
$ vnproofer all --help
vnproofer all

perform full spell check of all rpy files

Options:
  -v, --version         Show version number                                      [boolean]
  -s, --suppress-intro  Suppress intro of command               [boolean] [default: false]
  -h, --help            Show help                                                [boolean]
```

### Counts

Query git to find out how many words and how many dialogue words have been committed since 1 am today

#### Counts Command
```
vnproofer counts
```
or
```
vnproofer n
```
#### Counts Help

```
$ vnproofer counts --help
vnproofer counts

Query git to find out how many words have been committed today

Options:
  -v, --version         Show version number                                      [boolean]
  -s, --suppress-intro  Suppress intro of command               [boolean] [default: false]
  -m, --only-me         Only show my own counts                 [boolean] [default: false]
  -b, --verbose         Show detailed logs of changes with word counts for examination
                                                                [boolean] [default: false]
  -h, --help            Show help                                                [boolean]
```

### Exclude

Handle words that are spelled wrong on purpose. If there is already a word exclusion list at the top of the file, the command will add the lowercase version of the word to the existing list in alphabetical order. Otherwise, it will add a new exclusion to the top of the file.

#### Exclude Command
```
vnproofer exclude ./myfile.rpy yall
```
or
```
vnproofer e ./myfile.rpy yall
```
#### Exclude Help
```
$ vnproofer exclude --help
vnproofer exclude <file> <word>

Handle words that are spelled wrong on purpose

Positionals:
  file  File path that has the misspelled word                         [string] [required]
  word  Word to exclude from misspelled words within file              [string] [required]

Options:
  -v, --version         Show version number                                      [boolean]
  -s, --suppress-intro  Suppress intro of command               [boolean] [default: false]
  -h, --help            Show help                                                [boolean]
```

## Todo
- [x] Utility to show how many words added as well as how many dialog words have been added today by pulling all changes added to a git repo
- [ ] Ability to automatically add the [cSpell GitHub action](https://github.com/marketplace/actions/cspell-action) to an existing codebase
- [x] Ability to add words misspelled on purpose to an exclusion list at the top of the file
- [ ] Ability to add file-level excluded words to the local dictionary if the exclusion is used in more than one file and remove the local exclusion from all files
- [ ] Ability to iterate over each misspelled word and choose how to handle it (add to file level exclusion, add to the local dictionary)
- [ ] Ability to iterate over all-new dialogue (like a new pull request to review)
- [ ] Ability to view all Ren'Py lint issues
- [ ] Ability to automatically add [Ren'Py linting GitHub action](https://github.com/marketplace/actions/lint-ren-py-project) to an existing codebase
- [ ] Ability to run a line of dialogue through a command-line grammatical tool like [gramma](https://caderek.github.io/gramma/)
- [ ] Ability to install global cSpell installation through config menu if not already installed
- [ ] Ability to install global gramma installation through config menu if not already installed
- [ ] Ability to extract from `*.rpa` files
- [ ] Ability to extract from `*.rpyc` files
- [ ] Ability to automatically generate a corrections file to be sent to an author to facilitate automatically correcting issues
- [ ] Ability to automatically add recommended VSCode extensions for Ren'Py

---
_Source: https://npm.io/package/vnproofer · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
