4

I'm writing and correcting API documentation in Sphinx using reStructuredText. Does anyone know of a good spellchecker that will handle this format, or a bunch of Unix/Linux tools that will allow me to use Aspell with it?

bad_coder
  • 643
  • 1
  • 7
  • 16
Fred Foo
  • 985
  • 5
  • 12

2 Answers2

2

There's a Sphinx extension for spell checking. It uses enchant, rather than aspell, but perhaps you might find it useful.

https://github.com/sphinx-contrib/spelling

(formerly https://bitbucket.org/dhellmann/sphinxcontrib-spelling)

there's a blog article about it here:

https://doughellmann.com/blog/2011/05/26/creating-a-spelling-checker-for-restructuredtext-documents/

which explains how the extension was created, so if you're set on/stuck with using aspell specifically, maybe you can adapt it to aspell.

Kevin Horn
  • 138
  • 5
1

Since aspell has options for checking HTML and TeX files, you can spell-check some HTML or Tex produced by Sphinx. I imagine you could also use aspell on text output from Sphinx - assuming that removes any mark-up (e.g. asterisks) that might confuse aspell .

RedGrittyBrick
  • 81,981
  • 20
  • 135
  • 205
  • What would the command line be for checking a single file interactively? – Fred Foo May 22 '11 at 17:18
  • `aspell check [options] filename` according to the [manual](http://aspell.net/man-html/Spellchecking-Individual-Files.html#Spellchecking-Individual-Files) – RedGrittyBrick May 22 '11 at 17:19
  • I meant the Sphinx command. I can only find the command for building an entire directory full of files, rather than turning a single file into flat text. – Fred Foo May 22 '11 at 18:29
  • I need to install `aspell-en` (archlinux) to fix the error `Error: No word lists can be found for the language "en_US".` On other package managers it is listed as `en-aspell`. – Bryce Guinta Nov 27 '16 at 10:23
  • I'm not attached to any particular checker. I tried aspell. When I ran it with right-click "Send To" it created a zero-length file with the extension ".new," although the input contained many proprietary terms it couldn't have recognized. When I ran it from the command line I found that the installer didn't add it to the system path; when I got around that it gave the error "No word lists can be found." /// Apparently some hacking is needed to raise it to the "kick it and it moves" level. I'll investigate further when I have time, but my expectations are low; so far it gets an "F" for finish. – Jonathan Sachs Sep 19 '21 at 15:03
  • I tried the Sphinx spelling extension too, but I couldn't get Sphinx to recognize that it was there. Apparently the theme I'm using has its own virtual environment, and I have to install it in that environment. I asked for assistance, but the person I asked is pushing back instead, with "You shouldn't want to do that." This may or may not be a productive approach, but it's proving to be a difficult one. – Jonathan Sachs Sep 19 '21 at 15:07