projects
/
zzz-pokedex.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Re-rip G/S/C egg moves.
[zzz-pokedex.git]
/
pokedex
/
lookup.py
diff --git
a/pokedex/lookup.py
b/pokedex/lookup.py
index
cf6a15f
..
bab2a42
100644
(file)
--- a/
pokedex/lookup.py
+++ b/
pokedex/lookup.py
@@
-1,7
+1,5
@@
# encoding: utf8
# encoding: utf8
-from collections import namedtuple
import os, os.path
import os, os.path
-import pkg_resources
import random
import re
import shutil
import random
import re
import shutil
@@
-16,9
+14,12
@@
from whoosh.qparser import QueryParser
import whoosh.scoring
import whoosh.spelling
import whoosh.scoring
import whoosh.spelling
+from pokedex.util import namedtuple
+
from pokedex.db import connect
import pokedex.db.tables as tables
from pokedex.roomaji import romanize
from pokedex.db import connect
import pokedex.db.tables as tables
from pokedex.roomaji import romanize
+from pokedex.defaults import get_default_index_dir
__all__ = ['PokedexLookup']
__all__ = ['PokedexLookup']
@@
-102,10
+103,10
@@
class PokedexLookup(object):
# By the time this returns, self.index, self.speller, and self.session
# must be set
# By the time this returns, self.index, self.speller, and self.session
# must be set
- #
Defaults
- if
not directory
:
- directory =
pkg_resources.resource_filename('pokedex',
- 'data/whoosh-index')
+ #
If a directory was not given, use the default
+ if
directory is None
:
+ directory =
get_default_index_dir()
+
self.directory = directory
if session:
self.directory = directory
if session: