Ask Fanny is a mini search engine for the reference documentation of the Fantom Programming Language - see http://fantom.org/.
It's a library that indexes and ranks all the headings and titles of the core Fantom documentation and libraies for single words, and makes them available as:
- a programmable API
- a Command Line Program
- a Website
Every standard Fantom installation comes complete with examples and reference documentation. Tools such as Explorer let you view that documentation, which is great if you know what you're looking for or wish read it from start to finish like a novel.
But searching can be difficult if you don't know exactly where to look... it is hoped "Ask Fanny" fills that gap.
Install Ask Fanny
with the Fantom Pod Manager ( FPM ):
C:\> fpm install afAskFanny
Or install Ask Fanny
with fanr:
C:\> fanr install -r http://eggbox.fantomfactory.org/fanr/ afAskFanny
To use in a Fantom project, add a dependency to build.fan
:
depends = ["sys 1.0", ..., "afAskFanny 0.0"]
Full API & fandocs are available on the Eggbox - the Fantom Pod Repository.
The API contains an IndexBuilder that creates an Index which you query for Section results.
index := IndexBuilder().indexAllPods.build
results := index.askFanny("Fantom")
results.each { echo(it.toPlainText) }
Ask Fanny may be run from a command line to give instant search results:
> fan afAskFanny Maps
Use the -h
flag to list available options.
> fan afAskFanny -h
Ask Fanny is also distributed with a fully functioning web site. To launch it, use the -webserver
option from the command line.
> fan afAskFanny -webserver
By default Ask Fanny runs on port 8069 so point your browser at http://localhost:8069/
to view.
The Ask Fanny website is also availble online at http://askfanny.fantomfactory.org.
Fanny is the mascot of the Fantom programming language as named by Andy Frank (one of Fantom's creators) in this forum post. The mascot cartoon itself was evolved for the Fantom-Lang website.
The "Did you mean?" feature taken from Statistical Spelling Correction by Robert Koeninger.