Sat Jul 4 10:05:29 PDT 2015

How to Check Site Spelling

Do you want to run a spell check on your blog or web site? Perhaps not every day - but occasionally this can be helpful to remove basic errors. You can combine a wget download with a find command and aspell to get a list of your typos. Here's how:

#!/bin/sh
#check spelling on The Molecular Universe

wget --mirror -p --html-extension --convert-links \
-P ./ http://www.themolecularuniverse.com

find www.themolecularuniverse.com -name "*.html" |
while read file
do
    echo $file
    aspell --mode=html list < $file | sort -u
done

Put the commands above into a file, then execute the file at the command line, and you will run a spell check of www.themolecularuniverse.com - add an argument and/or some error checking to check your own sites.


Posted by ZFS | Permanent link | File under: bash