diff --git a/plugins/ShrinkUrl/config.py b/plugins/ShrinkUrl/config.py index b2e213a37..08e651f96 100644 --- a/plugins/ShrinkUrl/config.py +++ b/plugins/ShrinkUrl/config.py @@ -42,11 +42,11 @@ def configure(advanced): conf.supybot.plugins.ShrinkUrl.shrinkSnarfer.setValue(True) class ShrinkService(registry.OnlySomeStrings): - """Valid values include 'ln', 'tiny', 'xrl', 'goo', 'ur1', and 'x0'.""" - validStrings = ('ln', 'tiny', 'xrl', 'goo', 'ur1', 'x0') + """Valid values include 'ln', 'tiny', 'goo', 'ur1', and 'x0'.""" + validStrings = ('ln', 'tiny', 'goo', 'ur1', 'x0') class ShrinkCycle(registry.SpaceSeparatedListOfStrings): - """Valid values include 'ln', 'tiny', 'xrl', 'goo', 'ur1', and 'x0'.""" + """Valid values include 'ln', 'tiny', 'goo', 'ur1', and 'x0'.""" Value = ShrinkService def __init__(self, *args, **kwargs): diff --git a/plugins/ShrinkUrl/locales/fi.po b/plugins/ShrinkUrl/locales/fi.po index af622fcbb..289e1c8fd 100644 --- a/plugins/ShrinkUrl/locales/fi.po +++ b/plugins/ShrinkUrl/locales/fi.po @@ -5,8 +5,8 @@ msgid "" msgstr "" "Project-Id-Version: Limnoria\n" -"POT-Creation-Date: 2014-12-20 11:59+EET\n" -"PO-Revision-Date: 2014-12-20 12:21+0200\n" +"POT-Creation-Date: 2015-01-24 19:31+CET\n" +"PO-Revision-Date: 2015-01-24 19:31+0100\n" "Last-Translator: Mikaela Suomalainen \n" "Language-Team: suomi <>\n" "Language: fi\n" @@ -28,8 +28,8 @@ msgstr "" " tämän kaappaajan olevan käytössä?" #: config.py:45 config.py:49 -msgid "Valid values include 'ln', 'tiny', 'xrl', 'goo', 'ur1', and 'x0'." -msgstr "Kelvolliset arvot ovat 'ln', 'tiny', 'xrl', 'goo', 'ur1' ja 'x0' ." +msgid "Valid values include 'ln', 'tiny', 'goo', 'ur1', and 'x0'." +msgstr "Kelvolliset arvot ovat 'ln', 'tiny', 'goo', 'ur1' ja 'x0' ." #: config.py:70 msgid "" @@ -145,19 +145,7 @@ msgstr "" "osoitteesta>.\n" " " -#: plugin.py:248 -msgid "" -"\n" -"\n" -" Returns an xrl.us version of .\n" -" " -msgstr "" -"\n" -"\n" -" Palauttaa xrl.us palvelun lyhentämän version .\n" -" " - -#: plugin.py:281 +#: plugin.py:252 msgid "" "\n" "\n" @@ -168,7 +156,7 @@ msgstr "" "\n" " Palauttaa goo.gl-palvelun lyhentämän version ." -#: plugin.py:311 +#: plugin.py:282 msgid "" "\n" "\n" @@ -179,7 +167,7 @@ msgstr "" " Palauttaa ur1-version .\n" " " -#: plugin.py:338 +#: plugin.py:309 msgid "" "\n" "\n" @@ -191,7 +179,7 @@ msgstr "" " Palauttaa x0.no palvelun lyhentämän version .\n" " " -#: plugin.py:365 +#: plugin.py:336 msgid "" "\n" "\n" @@ -202,5 +190,16 @@ msgstr "" " Palauttaa laajennetun version .\n" " " +#~ msgid "" +#~ "\n" +#~ "\n" +#~ " Returns an xrl.us version of .\n" +#~ " " +#~ msgstr "" +#~ "\n" +#~ "\n" +#~ " Palauttaa xrl.us palvelun lyhentämän version .\n" +#~ " " + #~ msgid "Valid values include 'ln', 'tiny', 'xrl', 'goo', and 'x0'." #~ msgstr "Kelvolliset arvot ovat 'ln', 'tiny', 'xrl', 'goo' ja 'x0' ." diff --git a/plugins/ShrinkUrl/locales/fr.po b/plugins/ShrinkUrl/locales/fr.po index 83cf625b5..f4531dae5 100644 --- a/plugins/ShrinkUrl/locales/fr.po +++ b/plugins/ShrinkUrl/locales/fr.po @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: Limnoria\n" -"POT-Creation-Date: 2014-12-20 11:59+EET\n" -"PO-Revision-Date: \n" +"POT-Creation-Date: 2015-01-24 19:31+CET\n" +"PO-Revision-Date: 2015-01-24 19:32+0100\n" "Last-Translator: Valentin Lorentz \n" "Language-Team: Limnoria \n" "Language: \n" @@ -23,9 +23,9 @@ msgstr "" "snarfer ?" #: config.py:45 config.py:49 -msgid "Valid values include 'ln', 'tiny', 'xrl', 'goo', 'ur1', and 'x0'." +msgid "Valid values include 'ln', 'tiny', 'goo', 'ur1', and 'x0'." msgstr "" -"Les valeurs valides incluent 'ln', 'tiny', 'xrl', 'goo', 'ur1', et 'x0'." +"Les valeurs valides incluent 'ln', 'tiny', 'goo', 'ur1', et 'x0'." #: config.py:70 msgid "" @@ -125,18 +125,7 @@ msgstr "" "\n" "Retourne une version de TinyURL.com de l'." -#: plugin.py:248 -msgid "" -"\n" -"\n" -" Returns an xrl.us version of .\n" -" " -msgstr "" -"\n" -"\n" -"Retourne une version de xrl.us de l'." - -#: plugin.py:281 +#: plugin.py:252 msgid "" "\n" "\n" @@ -147,7 +136,7 @@ msgstr "" "\n" "Retourne une version de goo.gl de l'." -#: plugin.py:311 +#: plugin.py:282 msgid "" "\n" "\n" @@ -158,7 +147,7 @@ msgstr "" "\n" "Retourne une version de ur1 de l'." -#: plugin.py:338 +#: plugin.py:309 msgid "" "\n" "\n" @@ -169,7 +158,7 @@ msgstr "" "\n" "Retourne une version de x0.no de l'." -#: plugin.py:365 +#: plugin.py:336 msgid "" "\n" "\n" @@ -180,5 +169,15 @@ msgstr "" "\n" "Retourne la version large de l'." +#~ msgid "" +#~ "\n" +#~ "\n" +#~ " Returns an xrl.us version of .\n" +#~ " " +#~ msgstr "" +#~ "\n" +#~ "\n" +#~ "Retourne une version de xrl.us de l'." + #~ msgid "Valid values include 'ln', 'tiny', 'xrl', 'goo', and 'x0'." #~ msgstr "Les valeurs valides incluent 'ln', 'tiny', 'xrl', 'goo', et 'x0'." diff --git a/plugins/ShrinkUrl/locales/it.po b/plugins/ShrinkUrl/locales/it.po index 4a4a1a5d0..622c31e29 100644 --- a/plugins/ShrinkUrl/locales/it.po +++ b/plugins/ShrinkUrl/locales/it.po @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: Limnoria\n" -"POT-Creation-Date: 2014-12-20 11:59+EET\n" +"POT-Creation-Date: 2015-01-24 19:31+CET\n" "PO-Revision-Date: 2015-01-24 11:45+0100\n" "Last-Translator: skizzhg \n" "Language-Team: Italian \n" @@ -21,9 +21,9 @@ msgstr "" #: config.py:45 config.py:49 #, fuzzy -msgid "Valid values include 'ln', 'tiny', 'xrl', 'goo', 'ur1', and 'x0'." +msgid "Valid values include 'ln', 'tiny', 'goo', 'ur1', and 'x0'." msgstr "" -"I valori validi comprendono \"ln\", \"tiny\", \"xrl\", \"goo\" e \"x0\"." +"I valori validi comprendono \"ln\", \"tiny\", \"goo\" e \"x0\"." #: config.py:70 msgid "" @@ -132,19 +132,7 @@ msgstr "" " Restituisce una versione di TinyURL.com di \n" " " -#: plugin.py:248 -msgid "" -"\n" -"\n" -" Returns an xrl.us version of .\n" -" " -msgstr "" -"\n" -"\n" -" Restituisce una versione di xrl.us di .\n" -" " - -#: plugin.py:281 +#: plugin.py:252 msgid "" "\n" "\n" @@ -156,7 +144,7 @@ msgstr "" " Restituisce una versione di goo.gl di .\n" " " -#: plugin.py:311 +#: plugin.py:282 #, fuzzy msgid "" "\n" @@ -169,7 +157,7 @@ msgstr "" " Restituisce una versione di xrl.us di .\n" " " -#: plugin.py:338 +#: plugin.py:309 msgid "" "\n" "\n" @@ -181,7 +169,7 @@ msgstr "" " Restituisce una versione di x0.no di .\n" " " -#: plugin.py:365 +#: plugin.py:336 #, fuzzy msgid "" "\n" @@ -193,3 +181,14 @@ msgstr "" "\n" " Restituisce una versione di x0.no di .\n" " " + +#~ msgid "" +#~ "\n" +#~ "\n" +#~ " Returns an xrl.us version of .\n" +#~ " " +#~ msgstr "" +#~ "\n" +#~ "\n" +#~ " Restituisce una versione di xrl.us di .\n" +#~ " " diff --git a/plugins/ShrinkUrl/messages.pot b/plugins/ShrinkUrl/messages.pot index dac12252f..256a4f321 100644 --- a/plugins/ShrinkUrl/messages.pot +++ b/plugins/ShrinkUrl/messages.pot @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2014-12-20 11:59+EET\n" +"POT-Creation-Date: 2015-01-24 19:31+CET\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -24,7 +24,7 @@ msgstr "" #: config.py:45 config.py:49 #, docstring -msgid "Valid values include 'ln', 'tiny', 'xrl', 'goo', 'ur1', and 'x0'." +msgid "Valid values include 'ln', 'tiny', 'goo', 'ur1', and 'x0'." msgstr "" #: config.py:70 @@ -106,16 +106,7 @@ msgid "" " " msgstr "" -#: plugin.py:248 -#, docstring -msgid "" -"\n" -"\n" -" Returns an xrl.us version of .\n" -" " -msgstr "" - -#: plugin.py:281 +#: plugin.py:252 #, docstring msgid "" "\n" @@ -124,7 +115,7 @@ msgid "" " " msgstr "" -#: plugin.py:311 +#: plugin.py:282 #, docstring msgid "" "\n" @@ -133,7 +124,7 @@ msgid "" " " msgstr "" -#: plugin.py:338 +#: plugin.py:309 #, docstring msgid "" "\n" @@ -142,7 +133,7 @@ msgid "" " " msgstr "" -#: plugin.py:365 +#: plugin.py:336 #, docstring msgid "" "\n" diff --git a/plugins/ShrinkUrl/plugin.py b/plugins/ShrinkUrl/plugin.py index ef0cdb1a7..9298b8ec1 100644 --- a/plugins/ShrinkUrl/plugin.py +++ b/plugins/ShrinkUrl/plugin.py @@ -229,35 +229,6 @@ class ShrinkUrl(callbacks.PluginRegexp): irc.errorPossibleBug(str(e)) tiny = thread(wrap(tiny, ['url'])) - _xrlApi = 'http://metamark.net/api/rest/simple' - @retry - def _getXrlUrl(self, url): - quotedurl = utils.web.urlquote(url) - try: - return self.db.get('xrl', quotedurl) - except KeyError: - data = utils.web.urlencode({'long_url': url}) - text = utils.web.getUrl(self._xrlApi, data=data).decode() - if text.startswith('ERROR:'): - raise ShrinkError(text[6:]) - self.db.set('xrl', quotedurl, text) - return text - - @internationalizeDocstring - def xrl(self, irc, msg, args, url): - """ - - Returns an xrl.us version of . - """ - try: - xrlurl = self._getXrlUrl(url) - m = irc.reply(xrlurl) - if m is not None: - m.tag('shrunken') - except ShrinkError as e: - irc.error(str(e)) - xrl = thread(wrap(xrl, ['url'])) - _gooApi = 'https://www.googleapis.com/urlshortener/v1/url' @retry def _getGooUrl(self, url): diff --git a/plugins/ShrinkUrl/test.py b/plugins/ShrinkUrl/test.py index 948114007..b8df89d35 100644 --- a/plugins/ShrinkUrl/test.py +++ b/plugins/ShrinkUrl/test.py @@ -41,8 +41,6 @@ class ShrinkUrlTestCase(ChannelPluginTestCase): (udUrl, r'http://tinyurl.com/u479')], 'ln': [(sfUrl, r'http://ln-s.net/\+PE-'), (udUrl, r'http://ln-s.net/2\$K')], - 'xrl': [(sfUrl, r'http://xrl.us/bfq8ik'), - (udUrl, r'http://xrl.us/bfnyji')], 'goo': [(sfUrl, r'http://goo.gl/3c59N'), (udUrl, r'http://goo.gl/ocTga')], 'ur1': [(sfUrl, r'http://ur1.ca/9xl25'), @@ -98,9 +96,6 @@ class ShrinkUrlTestCase(ChannelPluginTestCase): def testLnsnarf(self): self._snarf('ln') - def testXrlsnarf(self): - self._snarf('xrl') - def testGoosnarf(self): self._snarf('goo')