Title: updated searchme.py

Since I've been asking lots of questions lately, I thought I'd try to repay a bit by updating the searchme.py Python wrapper script.

New features include:

* Vanity comment showing author ;)
* Safer method of calling htsearch (using urllib instead of command line)
* The ability to display "tips" based on search terms.  If there are a lot of terms, this could be drawn from a database or something, but for a few I figured hard-code them in the script.

* A message and link, if a restrictive search was done, offering to search the whole site.

Still has:
* spell checking and suggestions (if no matches found)

Works by searching and replacing text in the output of htsearch.  Relies on sed and aspell (could use ispell, see commented out line to do that).  For Python on Windows, but could easily be adapted for unix.

Comments welcome!  I'm sure it could be improved.

Greg Holmes
[EMAIL PROTECTED]

 

searchme.py

Reply via email to