implement spell checking targets to aid tech writers and documentation contributors

- add two new targets to our Makefile: `spell' and `spell_all'
- we rely on `aspell' spell checking tool (http://aspell.net/), it must
  be installed in system
- `spell' target triggers aspell to check files that were touched by
  current commit; suggested workflow:
  * git checkout -b release-notes-vX.Y
  * edit files with your favourite editor
  * git commit -a
  * make spell
  * git commit --amend
  * git review
- `spell_all' target will run aspell against all .rst files found in
  pages/ directory
- provide aspell wordlist `.aspell_en.wordlist', so that aspell would
  not ask you each time when it finds unknown word or acronym (e.g.
  VLAN, PXE, DHCP, etc)
- mention `aspell' in README.md

Change-Id: I87a3dcdf5e3e926f737933a00c7597065e4f80ee
This commit is contained in:
Igor Zinovik 2014-08-08 21:51:16 +04:00
parent 9cf638a622
commit 27a011e04b
3 changed files with 249 additions and 4 deletions

224
.aspell_en.wordlist Normal file
View File

@ -0,0 +1,224 @@
personal_ws-1.1 en 223
AMQP
API
APIs
Arista
assignee
AWS
backend
backends
backplane
balancer
balancers
behaviour
binded
bootable
bootloader
Brasero
Broadcom
CCISS
Ceilometer
CentOS
Ceph
checkbox
CIB
CIDR
Cirros
Cisco
CLI
Cloudera
CloudFormation
ClusterLabs
colocation
ConnectX
corosync
Cygwin
datacenter
datastore
Datastores
DHCP
DNS
DoS
dropdown
DRS
ESX
ESXi
eth
Etherpad
failover
FCoE
filesystem
FlatDHCP
FlatDHCPManager
FlatManager
frontend
Galera
Gerrit
GHz
GRE
GRO
GTID
GUID
Hadoop
HAproxy
HAProxy
hardcoded
Haswell
HDD
HDP
HealthCheck
Heartbleed
HortonWorks
hostname
hypervisor
hypervisors
IaaS
IceHouse
IDE
iDRAC
IEEE
IIS
IMG
ImgBurn
InfraRecorder
IOMMU
IOPS
IOV
IP
IPMI
IPs
iptables
IRC
iSCSI
iSER
JBOD
jpg
JSON
JVM
KVM
LACP
LBaaS
LDAP
Lenovo
lifecycle
login
lookups
loopback
LVM
LXC
MBR
Mellanox
memcached
metadata
middleware
Mirantis
Mnesia
MongoDB
MTU
multi
multicast
Murano
MySQL
Nagios
Nailgun
namespace
namespaces
Netgear
NFS
Nginx
NIC
NICs
NSX
NTP
OEM
online
openssh
OpenSSL
openstack
OpenStack
OpenSUSE
OSD
OSI
OSTF
overcommit
oversubscription
OVS
PageBreak
paravirtualized
Paxos
PCnet
pdf
PKI
plugin
png
PostgreSQL
POSTROUTING
PowerEdge
prefetch
PuppetDB
PXE
pxelinux
QEMU
RabbitMQ
RADOS
RadosGW
RBD
RESTful
RHEL
RPC
rst
rsyslogd
runtime
SATA
Scalability
Screenshots
SLB
SNAT
SQL
SQLAlchemy
SSD
startup
Stateful
stderr
STP
subnet
subnets
sudo
symlinks
Synchrony
syslog
TCP
TFTP
TODO
UDP
UEFI
UI
ULV
untagged
upgraders
uplink
USB
UUID
VBoxManage
vboxnet
vCenter
VirtualBox
virtualization
virtualize
virtualized
VLAN
VLANManager
VLANs
VM
VMDK
vMotion
VMs
VMware
VMWare
VNC
vSphere
vSwitch
workflow
XFS
yaml
Zabbix

View File

@ -16,7 +16,9 @@ I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
IMAGEDIRS = _images
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf pdf text man changes linkcheck doctest gettext
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp \
epub latex latexpdf pdf text man changes linkcheck doctest gettext spell \
spell_all
help:
@echo "Please use \`make <target>' where <target> is one of"
@ -40,10 +42,12 @@ help:
@echo " changes to make an overview of all changed/added/deprecated items"
@echo " linkcheck to check all external links for integrity"
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
@echo " spell to run aspell against .rst files changed in current commit"
@echo " spell_all to run aspell against all .rst files in pages/ directory"
clean:
-rm -rf $(BUILDDIR)/*
-@rm -f $(PDFs)
-@rm -f $(PDFs)
# Pattern rule for converting SVG to PDF
%.pdf : %.svg
@ -172,3 +176,20 @@ doctest:
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
@echo "Testing of doctests in the sources finished, look at the " \
"results in $(BUILDDIR)/doctest/output.txt."
SPELL = aspell
ASPELLOPTS = --dont-backup -d en --personal=.aspell_en.wordlist
RSTS := $(shell find pages/ -type f -name '*.rst')
COMMIT_RSTS := $(shell git diff-tree --no-commit-id --name-only -r HEAD)
spell:
@for rst in $(COMMIT_RSTS); do \
$(SPELL) $(ASPELLOPTS) check $$rst; \
done
spell_all:
@for rst in $(RSTS); do \
$(SPELL) $(ASPELLOPTS) check $$rst; \
done
@echo "Spell check complete"

View File

@ -31,11 +31,11 @@ To get started, you need to install all necesasary tools.
On Debian/Ubuntu:
sudo apt-get install git python-pip python-dev make imagemagick libjpeg-dev inkscape
sudo apt-get install git python-pip python-dev make imagemagick libjpeg-dev inkscape aspell
On Fedora:
sudo yum install git python-pip python-devel make ImageMagick libjpeg-turbo-devel inkscape
sudo yum install git python-pip python-devel make ImageMagick libjpeg-turbo-devel inkscape aspell
Among other things that installs
[ImageMagick](http://www.imagemagick.org/ "ImageMagick") and