No description
Find a file
2021-11-29 07:34:04 -06:00
.gitignore update .gitignore 2021-06-10 18:07:50 -05:00
ana.1 manpage: document -L 2016-05-15 12:24:13 -05:00
ana.html this is not ajax mode 2016-05-15 15:17:13 -05:00
anagram.js add copyright notice 2013-09-21 10:22:50 -05:00
dictfilt.py dictfilt: add coding declaration 2016-05-15 11:58:15 -05:00
import add emscripten target 2016-05-15 14:59:31 -05:00
LICENSE license and readme... 2013-02-19 14:18:13 -06:00
Makefile add 'clean' target 2021-11-29 07:34:04 -06:00
README.md update README 2021-06-10 18:07:34 -05:00
run.cc use modern C++ way of not having a standard method 2021-11-28 21:50:45 -06:00
webapp.py Improve the web app, particularly for mobile 2013-09-21 10:20:39 -05:00

Build instructions:

make

Use instructions:

./ana terms...
man ./ana.1 ;# for help

Binary dictionaries

These start a bit faster than reading the system dictionary.

Build one with

./ana -D dict.bin -d /usr/share/dict/words

then use it with

./ana -D dict.bin terms...

Python use

$ python3
>>> import ana
>>> d = ana.from_binary("dict.bin")
>>> for row in d.run("hello world"):
...    print(row)

Web app installation instructions

Most likely this is heavily bitrotted, the cgi script has not been updated for python3.

  1. build a binary dictionary:

    ./ana -D dict.bin -d /usr/share/dict/words

  2. Copy anamodule.so, the binary dictionary, anagram.js and webapp.py to your webspace (or put anamodule.so on your PYTHONPATH)

  3. Optionally, edit webapp.py to use your own copy of jquery instead of the one from the code.jquery.com cdn

  4. Set up .htaccess, e.g.,

    AddHandler fcgid-script .fcgi Options +ExecCgi DirectoryIndex index.fcgi Order allow,deny Allow from all

Live web version

http://ana.unpythonic.net