summaryrefslogtreecommitdiff
path: root/web.py
diff options
context:
space:
mode:
authoryvesf <yvesf-git@xapek.org>2010-11-20 02:12:50 +0100
committeryvesf <yvesf-git@xapek.org>2010-11-20 02:12:50 +0100
commitbec8150c93a640ac4b6d1cebc86bd721dfdd6b59 (patch)
treecc7e02b211afa6ba7ba11432e00124dc617ce760 /web.py
parent966a17b12c9deab35ef0a804d9fa1faea9c8042d (diff)
downloadbooksearch-bec8150c93a640ac4b6d1cebc86bd721dfdd6b59.tar.gz
booksearch-bec8150c93a640ac4b6d1cebc86bd721dfdd6b59.zip
update INSTALL help; rename index->indexer; prettify web.py
Diffstat (limited to 'web.py')
-rw-r--r--web.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/web.py b/web.py
index b747010..babc9dd 100644
--- a/web.py
+++ b/web.py
@@ -1,16 +1,16 @@
#!/usr/bin/python2.6
# coding: utf-8
+from StringIO import StringIO
from whoosh.index import open_dir
from whoosh.qparser import QueryParser
import whoosh.fields as fields
import whoosh.analysis as analysis
-from whoosh import highlight
+import whoosh.highlight as highlight
import flask
-from flask import Flask
import pyPdf
-from StringIO import StringIO
import werkzeug
-app = Flask("booksearch")
+
+app = flask.Flask("booksearch")
index = open_dir(u"index", mapped=False)
searcher = index.searcher()