From 495c20c435687dcd36d8f5cabc5241eaa1589807 Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Sun, 16 Mar 2014 22:31:25 +0000 Subject: [PATCH] MeditationExcuses: Remove plugin (website is down). --- MeditationExcuses/README.txt | 1 - MeditationExcuses/__init__.py | 67 --------------------------- MeditationExcuses/config.py | 52 --------------------- MeditationExcuses/local/__init__.py | 1 - MeditationExcuses/plugin.py | 72 ----------------------------- MeditationExcuses/test.py | 40 ---------------- 6 files changed, 233 deletions(-) delete mode 100644 MeditationExcuses/README.txt delete mode 100644 MeditationExcuses/__init__.py delete mode 100644 MeditationExcuses/config.py delete mode 100644 MeditationExcuses/local/__init__.py delete mode 100644 MeditationExcuses/plugin.py delete mode 100644 MeditationExcuses/test.py diff --git a/MeditationExcuses/README.txt b/MeditationExcuses/README.txt deleted file mode 100644 index d60b47a..0000000 --- a/MeditationExcuses/README.txt +++ /dev/null @@ -1 +0,0 @@ -Insert a description of your plugin here, with any notes, etc. about using it. diff --git a/MeditationExcuses/__init__.py b/MeditationExcuses/__init__.py deleted file mode 100644 index 7f4fa8a..0000000 --- a/MeditationExcuses/__init__.py +++ /dev/null @@ -1,67 +0,0 @@ -### -# Copyright (c) 2012, Valentin Lorentz -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# * Redistributions of source code must retain the above copyright notice, -# this list of conditions, and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions, and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# * Neither the name of the author of this software nor the name of -# contributors to this software may be used to endorse or promote products -# derived from this software without specific prior written consent. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. - -### - -""" -Add a description of the plugin (to be presented to the user inside the wizard) -here. This should describe *what* the plugin does. -""" - -import supybot -import supybot.world as world - -# Use this for the version of this plugin. You may wish to put a CVS keyword -# in here if you're keeping the plugin in CVS or some similar system. -__version__ = "" - -# XXX Replace this with an appropriate author or supybot.Author instance. -__author__ = supybot.authors.unknown - -# 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__ = '' # 'http://supybot.com/Members/yourname/MeditationExcuses/download' - -from . import config -from . import plugin -from imp import reload -reload(plugin) # In case we're being reloaded. -# Add more reloads here if you add third-party modules and want them to be -# reloaded when this plugin is reloaded. Don't forget to import them as well! - -if world.testing: - from . import test - -Class = plugin.Class -configure = config.configure - - -# vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79: diff --git a/MeditationExcuses/config.py b/MeditationExcuses/config.py deleted file mode 100644 index 156cbb0..0000000 --- a/MeditationExcuses/config.py +++ /dev/null @@ -1,52 +0,0 @@ -### -# Copyright (c) 2012, Valentin Lorentz -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# * Redistributions of source code must retain the above copyright notice, -# this list of conditions, and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions, and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# * Neither the name of the author of this software nor the name of -# contributors to this software may be used to endorse or promote products -# derived from this software without specific prior written consent. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. - -### - -import supybot.conf as conf -import supybot.registry as registry -from supybot.i18n import PluginInternationalization, internationalizeDocstring - -_ = PluginInternationalization('MeditationExcuses') - -def configure(advanced): - # This will be called by supybot to configure this module. advanced is - # a bool that specifies whether the user identified himself as an 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('MeditationExcuses', True) - - -MeditationExcuses = conf.registerPlugin('MeditationExcuses') -# This is where your configuration variables (if any) should go. For example: -# conf.registerGlobalValue(MeditationExcuses, 'someConfigVariableName', -# registry.Boolean(False, _("""Help for someConfigVariableName."""))) - - -# vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79: diff --git a/MeditationExcuses/local/__init__.py b/MeditationExcuses/local/__init__.py deleted file mode 100644 index e86e97b..0000000 --- a/MeditationExcuses/local/__init__.py +++ /dev/null @@ -1 +0,0 @@ -# Stub so local is a module, used for third-party modules diff --git a/MeditationExcuses/plugin.py b/MeditationExcuses/plugin.py deleted file mode 100644 index a7fcd35..0000000 --- a/MeditationExcuses/plugin.py +++ /dev/null @@ -1,72 +0,0 @@ -### -# Copyright (c) 2012, Valentin Lorentz -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# * Redistributions of source code must retain the above copyright notice, -# this list of conditions, and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions, and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# * Neither the name of the author of this software nor the name of -# contributors to this software may be used to endorse or promote products -# derived from this software without specific prior written consent. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. - -### - -import supybot.utils as utils -from supybot.commands import * -import supybot.plugins as plugins -import supybot.ircutils as ircutils -import supybot.callbacks as callbacks - -try: - from supybot.i18n import PluginInternationalization - from supybot.i18n import internationalizeDocstring - _ = PluginInternationalization('MeditationExcuses') -except: - # This are useless functions that's allow to run the plugin on a bot - # without the i18n plugin - _ = lambda x:x - internationalizeDocstring = lambda x:x - -@internationalizeDocstring -class MeditationExcuses(callbacks.Plugin): - """Add the help for "@plugin help MeditationExcuses" here - This should describe *how* to use this plugin.""" - threaded = True - - @internationalizeDocstring - def meditationexcuse(self, irc, msg, args): - """takes no arguments. - - Fetch a mediation excuse from http://meditationexcus.es/""" - html = utils.web.getUrl('http://meditationexcus.es/').decode() - found = False - for line in html.split('\n'): - if found: - break - found = (line == " I didn't meditate because: ") - if found: - irc.reply(line.strip()) - else: - irc.error(_('Failed to fetch a meditation excuse.')) - -Class = MeditationExcuses - - -# vim:set shiftwidth=4 softtabstop=4 expandtab textwidth=79: diff --git a/MeditationExcuses/test.py b/MeditationExcuses/test.py deleted file mode 100644 index ada04f0..0000000 --- a/MeditationExcuses/test.py +++ /dev/null @@ -1,40 +0,0 @@ -### -# Copyright (c) 2012, Valentin Lorentz -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# * Redistributions of source code must retain the above copyright notice, -# this list of conditions, and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions, and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# * Neither the name of the author of this software nor the name of -# contributors to this software may be used to endorse or promote products -# derived from this software without specific prior written consent. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. - -### - -from supybot.test import * - -class MeditationExcusesTestCase(PluginTestCase): - plugins = ('MeditationExcuses',) - - def testMeditationexcuse(self): - self.assertNotError('meditationexcuse') - - -# vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79: