-
-
Notifications
You must be signed in to change notification settings - Fork 103
Expand file tree
/
Copy pathproofread
More file actions
executable file
·39 lines (33 loc) · 747 Bytes
/
Copy pathproofread
File metadata and controls
executable file
·39 lines (33 loc) · 747 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/bash
#
# Run "find duplicate adjacent words", "find abuse of the passive voice" and "find weasel words" linting on a single file.
#
# - Lint text:
#
# `proofread {{file}}`
#
# ---
# Based on http://matt.might.net/articles/shell-scripts-for-passive-voice-weasel-words-duplicates/
#
# Author: Nick Plekhanov, https://plekhanov.me
# License: MIT
# https://github.com/nicksp/dotfiles
# Common stuff
CYAN="$(tput setaf 6)"
UNDERLINE="$(tput sgr 0 1)"
RESET="$(tput sgr0)"
header() {
echo -e "${UNDERLINE}${CYAN}${1}${RESET}"
}
if [ "$1" = "" ]; then
echo "Usage: $(basename "$0") <file>"
exit
fi
header "Weasel words"
lint-weasel-words "$1"
echo
header "Passive voice"
lint-passive-voice "$1"
echo
header "Duplicates"
lint-dups "$1"