From 5862612205c33b587c59e94f0c11b1619dd044e6 Mon Sep 17 00:00:00 2001 From: Dominik Riebeling Date: Sun, 19 Jun 2011 09:41:03 +0000 Subject: Add script to spellcheck the manual LaTeX sources. This script wraps around aspell and calls it for the file passed on the command line or runs aspell on all TeX files found in the manual folder (except preamble.tex). aspell is called interactively. Note: there is currently no way to interrupt checking if running on the complete folder. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30013 a1c6a512-1295-4272-9138-f99709370657 --- manual/spellcheck.sh | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100755 manual/spellcheck.sh (limited to 'manual/spellcheck.sh') diff --git a/manual/spellcheck.sh b/manual/spellcheck.sh new file mode 100755 index 0000000000..4808192221 --- /dev/null +++ b/manual/spellcheck.sh @@ -0,0 +1,30 @@ +#!/bin/sh +# __________ __ ___. +# Open \______ \ ____ ____ | | _\_ |__ _______ ___ +# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / +# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < +# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ +# \/ \/ \/ \/ \/ +# +# Spell check files from the Rockbox manual. +# +# Call the script with a single file to spellcheck. Call it without arguments +# to spellcheck all files in the manual tree except preamble.tex. +# This will invoke aspell interactively. + +MANDIR=$(dirname $0) +if [ $# -gt 0 ]; then + TEX_FILES="$1" +else + TEX_FILES=$(find "$MANDIR" -name "*.tex" | sed -e "s/\S*preamble.tex//") +fi + +for file in $TEX_FILES; do + aspell -t -l en_UK-ise --add-tex-command="opt pp" \ + --add-tex-command="nopt pp" --add-tex-command="screenshot ppo" \ + --add-tex-command="reference p" --add-tex-command="fname p" \ + --add-tex-command="wikilink p" --add-tex-command="IfFileExists p" \ + --add-tex-command="newcommand pp" --add-tex-command="renewcommand pp" \ + --add-tex-command="download p" \ + -c $file +done -- cgit v1.2.3