projects
/
zzz-dywypi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7df67da
)
Pokedex: Update to work with new PokedexLookup class.
author
Eevee
<git@veekun.com>
Thu, 13 May 2010 07:26:50 +0000
(
00:26
-0700)
committer
Eevee
<git@veekun.com>
Thu, 13 May 2010 21:56:21 +0000
(14:56 -0700)
dywypi.conf
patch
|
blob
|
history
plugins/Pokedex/plugin.py
patch
|
blob
|
history
diff --git
a/dywypi.conf
b/dywypi.conf
index
f12289b
..
040d004
100644
(file)
--- a/
dywypi.conf
+++ b/
dywypi.conf
@@
-637,7
+637,7
@@
supybot.directories.log: ./logs
#
# Default value:
###
#
# Default value:
###
-supybot.plugins: Admin M
isc Pokedex WWWJDIC Channel User Unicode Owner Config NetHack Math
Karma
+supybot.plugins: Admin M
ath Misc NetHack Owner User Unicode WWWJDIC Config Pokedex Channel
Karma
###
# Determines whether this plugin is loaded by default.
###
# Determines whether this plugin is loaded by default.
@@
-852,7
+852,7
@@
supybot.plugins.Pokedex.public: True
#
# Default value:
###
#
# Default value:
###
-supybot.plugins.Pokedex.databaseURL: sqlite:////home/eevee/
beta.veekun.com/veekun/pokedex.db
+supybot.plugins.Pokedex.databaseURL: sqlite:////home/eevee/
dywypi/pokedex/pokedex/data/pokedex.sqlite
###
# Determines whether this plugin is loaded by default.
###
# Determines whether this plugin is loaded by default.
diff --git
a/plugins/Pokedex/plugin.py
b/plugins/Pokedex/plugin.py
index
9b35221
..
13ce031
100644
(file)
--- a/
plugins/Pokedex/plugin.py
+++ b/
plugins/Pokedex/plugin.py
@@
-67,7
+67,7
@@
class Pokedex(callbacks.Plugin):
self.__parent = super(Pokedex, self)
self.__parent.__init__(irc)
self.db = pokedex.db.connect(self.registryValue('databaseURL'))
self.__parent = super(Pokedex, self)
self.__parent.__init__(irc)
self.db = pokedex.db.connect(self.registryValue('databaseURL'))
- self.
indices = pokedex.lookup.open_index
(
+ self.
lookup = pokedex.lookup.PokedexLookup
(
directory=conf.supybot.directories.data.dirize('pokedex-index'),
session=self.db,
)
directory=conf.supybot.directories.data.dirize('pokedex-index'),
session=self.db,
)
@@
-86,8
+86,7
@@
class Pokedex(callbacks.Plugin):
thing = ascii_thing.decode('latin1')
# Similar logic to the site, here.
thing = ascii_thing.decode('latin1')
# Similar logic to the site, here.
- results = pokedex.lookup.lookup(thing, session=self.db,
- indices=self.indices)
+ results = self.lookup.lookup(thing)
# Nothing found
if len(results) == 0:
# Nothing found
if len(results) == 0: