1
0
Fork
You've already forked wwbash
0
This toolkit is a collection of shell-script wrappers and pipelines inspired by the original 1980s AT&T Writer's Workbench. It utilizes GNU Diction/Style and standard Unix utilities.
  • Shell 100%
2026年07月06日 10:39:11 -04:00
scripts updated define diffread repeatphrase wwb to be executable 2026年07月06日 10:36:45 -04:00
consistent_rules updated setup.sh to include the consistent_rules file with examples. 2026年06月29日 14:07:25 -04:00
install.sh updated install.sh for version 1.3.0 2026年07月06日 10:39:11 -04:00
LICENSE add license 2026年06月28日 21:30:55 -04:00
README.md Merge branch 'main' of ssh://codeberg.org/bawin/wwbash 2026年07月02日 18:38:09 -04:00
TODO.md Added TODO.md 2026年07月01日 21:28:48 -04:00

Writer's Workbench Bash

A collection of standalone shell scripts inspired by the Writer's Workbench package created by AT&T and Bell Labs in the early days of UNIX. Each tool does one job — finding weak words, flagging passive voice, checking readability, normalizing punctuation — and is meant to be piped, scripted, or run directly from any shell.

Installation

Run sh -c "$(curl -fsSL https://codeberg.org/bawin/wwbash/raw/branch/main/install.sh)"

Note for *BSD Users:

If you don't have curl, or don't want to use curl (or wget) you can run:

FreeBSD

sh -c "$(fetch -o - https://codeberg.org/bawin/wwbash/raw/branch/main/install.sh)"

Literally every other BSD out there apparently

sh -c "$(ftp -o - https://codeberg.org/bawin/wwbash/raw/branch/main/install.sh)"

macOS

Curl is installed, so you can use the above commands.

Windows

Unfortunately the shell options and GNU commands available on Windows are not sufficient to run these functions. The best option is using WSL (Windows Subsystem for Linux) to install a minimal environment, like Debian or Ubuntu, to run these in. The instructions for that are here.

Requirements (if not already present)

  • Perl
  • awk
  • sed

The following are optional and only needed by specific tools, which degrade gracefully (print an install hint and exit) if missing:

Tool Requires
wwb-spell GNU Aspell (aspell, aspell-en)
wwb-diction, wwb-style GNU Diction
prep_text and anything that calls it on non-.txt/.text files Pandoc

Naming convention

  • Plain names (weasel, passive, prose, outline, ...) are pure shell — no external dependencies, work anywhere bash and POSIX text tools exist.
  • Names prefixed wwb- (wwb-spell, wwb-diction, wwb-style) wrap an external program and will tell you what to install if it's missing.

The wwb command

Running wwb <file> produces a single combined report, calling every tool in the toolkit against one file and printing labeled sections. This is the "run everything" entry point. For individual checks, call the tool you want directly — it's faster and the output is easier to read on its own.

Configuration files

Two tools read editable configuration rather than hardcoded data. Both are meant to be tuned to your own writing, vocabulary, and house style.

~/.config/wwbash/stopwords.txt

A plain list of common English function words (articles, pronouns, conjunctions, auxiliary verbs, etc.), one word per line, used by:

  • wordfreq — filtered out so the frequency table shows your actual content vocabulary instead of being dominated by "the," "and," "is."
  • repeatphrase — used to skip bigrams/trigrams made entirely of function words ("of the," "in a"), so the repeated-phrase report surfaces meaningful repetition instead of grammatical noise.

Lines starting with # are treated as comments and ignored. Edit this file directly to add or remove words — for example, add domain-specific terms you want filtered out of your own frequency counts, or remove a word you want to track.

Because both wordfreq and repeatphrase read the same file, edits here affect both tools. If you find one tool's results getting worse after a stopword-list edit made with the other tool in mind, that's this shared design — see the comment at the top of either script.

~/.consistent_rules

Per-user rules for the consistent tool, which checks a document for inconsistent spelling/formatting variants (e.g. "email" vs. "e-mail"). Unlike stopwords.txt, this file is not installed by the packageconsistent creates it automatically, seeded with a small set of defaults, the first time you run it if it doesn't already exist:

# Format -> regex_pattern:description
e-?mail:email vs e-mail
file ?system:filesystem vs file system
set-?up:setup vs set up
data ?base:database vs data base
plug-?in:plugin vs plug-in

Each line is regex:description. The regex is matched case-insensitively as a whole word; every match found in the target document is counted and reported under the description. Lines starting with # are comments and ignored.

To add your own check — say, flagging "wifi" vs. "Wi-Fi" — add a line:

wi-?fi:wifi vs Wi-Fi

Because this file lives under your $HOME, it is personal to you and to the machine/account you're on. It is never touched by package install or upgrade, so there's no risk of an update clobbering rules you've added — but it also means it isn't shared automatically between machines or users; copy it yourself if you want the same rules elsewhere.

License

GPLv3 or later. See LICENSE.