mirror of
https://github.com/oddluck/limnoria-plugins.git
synced 2025-04-25 20:41:21 -05:00
Initial commit.
This commit is contained in:
parent
4c5a89f8ef
commit
dbe9879f42
@ -6,7 +6,7 @@
|
||||
###
|
||||
|
||||
"""
|
||||
Soccer: Fetches soccer scores and other information
|
||||
SoccerScores: Fetches soccer scores and other information
|
||||
"""
|
||||
|
||||
import sys
|
||||
@ -18,14 +18,17 @@ from supybot import world
|
||||
__version__ = ""
|
||||
|
||||
# XXX Replace this with an appropriate author or supybot.Author instance.
|
||||
__author__ = supybot.authors.unknown
|
||||
__author__ = supybot.Author('cottongin', 'cottongin',
|
||||
'cottongin@cottongin.club')
|
||||
__maintainer__ = getattr(supybot.authors, 'oddluck',
|
||||
supybot.Author('oddluck', 'oddluck', 'oddluck@riseup.net'))
|
||||
|
||||
# This is a dictionary mapping supybot.Author instances to lists of
|
||||
# contributions.
|
||||
__contributors__ = {}
|
||||
|
||||
# This is a url where the most recent plugin package can be downloaded.
|
||||
__url__ = ''
|
||||
__url__ = 'https://github.com/oddluck/limnoria-plugins/'
|
||||
|
||||
from . import config
|
||||
from . import plugin
|
@ -8,7 +8,7 @@
|
||||
from supybot import conf, registry
|
||||
try:
|
||||
from supybot.i18n import PluginInternationalization
|
||||
_ = PluginInternationalization('Soccer')
|
||||
_ = PluginInternationalization('SoccerScores')
|
||||
except:
|
||||
# Placeholder that allows to run the plugin on a bot
|
||||
# without the i18n module
|
||||
@ -21,10 +21,10 @@ def configure(advanced):
|
||||
# user or not. You should effect your configuration by manipulating the
|
||||
# registry as appropriate.
|
||||
from supybot.questions import expect, anything, something, yn
|
||||
conf.registerPlugin('Soccer', True)
|
||||
conf.registerPlugin('SoccerScores', True)
|
||||
|
||||
|
||||
Soccer = conf.registerPlugin('Soccer')
|
||||
Soccer = conf.registerPlugin('SoccerScores')
|
||||
# This is where your configuration variables (if any) should go. For example:
|
||||
# conf.registerGlobalValue(Soccer, 'someConfigVariableName',
|
||||
# registry.Boolean(False, _("""Help for someConfigVariableName.""")))
|
@ -11,7 +11,7 @@ from supybot import utils, plugins, ircutils, callbacks, schedule, conf
|
||||
from supybot.commands import *
|
||||
try:
|
||||
from supybot.i18n import PluginInternationalization
|
||||
_ = PluginInternationalization('Soccer')
|
||||
_ = PluginInternationalization('SoccerScores')
|
||||
except ImportError:
|
||||
# Placeholder that allows to run the plugin on a bot
|
||||
# without the i18n module
|
||||
@ -23,12 +23,12 @@ import pendulum
|
||||
import pickle
|
||||
|
||||
|
||||
class Soccer(callbacks.Plugin):
|
||||
class SoccerScores(callbacks.Plugin):
|
||||
"""Fetches soccer scores and other information"""
|
||||
threaded = True
|
||||
|
||||
def __init__(self, irc):
|
||||
self.__parent = super(Soccer, self)
|
||||
self.__parent = super(SoccerScores, self)
|
||||
self.__parent.__init__(irc)
|
||||
|
||||
self.PICKLEFILE = conf.supybot.directories.data.dirize("soccer-leagues.db")
|
||||
@ -144,7 +144,7 @@ class Soccer(callbacks.Plugin):
|
||||
|
||||
if not league:
|
||||
irc.reply('ERROR: You must provide a league via --league <league>')
|
||||
doc = irc.getCallback('Soccer').soccer.__doc__
|
||||
doc = irc.getCallback('SoccerScores').soccer.__doc__
|
||||
doclines = doc.splitlines()
|
||||
s = '%s' % (doclines.pop(0))
|
||||
if doclines:
|
||||
@ -318,7 +318,7 @@ class Soccer(callbacks.Plugin):
|
||||
|
||||
|
||||
|
||||
Class = Soccer
|
||||
Class = SoccerScores
|
||||
|
||||
|
||||
# vim:set shiftwidth=4 softtabstop=4 expandtab textwidth=79:
|
2
SoccerScores/requirements.txt
Normal file
2
SoccerScores/requirements.txt
Normal file
@ -0,0 +1,2 @@
|
||||
requests
|
||||
pendulum
|
@ -9,7 +9,7 @@ from supybot.test import *
|
||||
|
||||
|
||||
class SoccerTestCase(PluginTestCase):
|
||||
plugins = ('Soccer',)
|
||||
plugins = ('SoccerScores',)
|
||||
|
||||
|
||||
# vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79:
|
@ -1 +0,0 @@
|
||||
# Stub so local is a module, used for third-party modules
|
Loading…
x
Reference in New Issue
Block a user