Skip to content

Commit

Permalink
docs(all): update README and USAGE
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuar committed Oct 15, 2023
1 parent 9b412ec commit 686fa5f
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 19 deletions.
29 changes: 17 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,23 @@

## ❓ What is it?

Autocorrector is a tool similar to Autokey or AutoHotKey, but targeted mainly at word replacements. I wrote it because all I wanted to do was fix my fat-finger typos automatically. That is what autocorrector aims to do.
Autocorrector is a tool similar to Autokey or AutoHotKey, but targeted mainly at
word replacements. I wrote it because all I wanted to do was fix my fat-finger
typos automatically. That is what autocorrector aims to do.

Autocorrector reads a TOML configuration file of key-values; the key being the typo and the value being the replacement. When it detects you have entered a typo, it helpfully corrects it.
Autocorrector reads a TOML configuration file of key-values; the key being the
typo and the value being the replacement. When it detects you have entered a
typo, it helpfully corrects it.

## ⬇️ Installation

> **Note**
> **This program will only run on Linux**
1. Download either the `.rpm` or `.deb` file and install using your package manager.
2. Run `autocorrector` or use the **autocorrector** menu entry in your desktop environment.
1. Download either the `.rpm` or `.deb` file and install using your package
manager.
2. Run `autocorrector` or use the **autocorrector** menu entry in your desktop
environment.

## 📝 Configuration and additional details

Expand All @@ -33,20 +39,19 @@ to fix, feel free to send a pull request!

The following Go libraries and tools made autocorrector infinitely easier:

- [gokbd](https://github.com/joshuar/gokbd): library using libevdev to talk to a keyboard on Linux. It allows snooping the keys pressed as well as typing out keys.
- [gokbd](https://github.com/joshuar/gokbd): library using libevdev to talk to a
keyboard on Linux. It allows snooping the keys pressed as well as typing out
keys.
- [fyne](https://fyne.io/): UI toolkit and system tray library.
- [zerolog](https://github.com/rs/zerolog): logging library.
- [Viper](https://github.com/spf13/viper): configuration file handling.
- [Cobra](https://github.com/spf13/cobra): command-line interface.
- [nutsdb](https://xujiajun.cn/nutsdb/): simple, fast, embeddable and persistent key/value store written in pure Go.

Check out more awesome Go things at the [Awesome Go List](https://github.com/avelino/awesome-go):
Check out more awesome Go things at the [Awesome Go
List](https://github.com/avelino/awesome-go):

The default list of replacements is sourced from the following AutoHotKey script containing common English typos and misspellings:

- <https://www.autohotkey.com/download/AutoCorrect.ahk>

Icon taken from [here](https://pixabay.com/vectors/spellcheck-correct-typo-errors-1292780/).
Icon taken from
[here](https://pixabay.com/vectors/spellcheck-correct-typo-errors-1292780/).

## License

Expand Down
19 changes: 12 additions & 7 deletions USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,20 @@
## Managing corrections

- Autocorrector looks for a list of corrections in a `corrections.toml` file
located in `$HOME/.config/autocorrector/corrections.toml` by default.
located in one of the following places:
- `$HOME/.config/autocorrector/corrections.toml` (does not exist by default)
- `/usr/share/autocorrector/corrections.toml`
- This file is [TOML formatted](https://toml.io/en/).
- A default list of common English typos is provided, sourced from
[here](https://www.autohotkey.com/download/AutoCorrect.ahk).
- You can add/remove corrections from the file and Autocorrector, if running,
- The default list (`/usr/share/autocorrector/corrections.toml`) is
machine-generated from [Wikipedia's list of common
mispellings](https://en.wikipedia.org/wiki/Wikipedia:Lists_of_common_misspellings).
As it is machine-generated, there may be some unwanted or unexpected
corrections. Some cleaning of the list is done. The code for generating the
default list can be found in the `tools/scraper` directory of the source
code repository.
- You can add/remove corrections by copying the default list to
`$HOME/.config/autocorrector/corrections.toml` and editing the file. Autocorrector, if running,
will pick up the changes automatically.
- The tray icon menu provides a convenient way to edit the file, select the
*Edit* option and the corrections file will open in your preferred text editor
for quick editing.

## Other features

Expand Down

0 comments on commit 686fa5f

Please sign in to comment.