From 89701bbcf59507266fc43ac5c0c364efaffe57a8 Mon Sep 17 00:00:00 2001 From: Florent Date: Mon, 2 Apr 2012 16:40:33 +0200 Subject: [PATCH] Remove unused file --- modules/googletranslate/tools.py | 41 -------------------------------- 1 file changed, 41 deletions(-) delete mode 100644 modules/googletranslate/tools.py diff --git a/modules/googletranslate/tools.py b/modules/googletranslate/tools.py deleted file mode 100644 index 15d6b9ec..00000000 --- a/modules/googletranslate/tools.py +++ /dev/null @@ -1,41 +0,0 @@ -"tools for lefigaro backend" -# -*- coding: utf-8 -*- - -# Copyright(C) 2011 Julien Hebert -# -# This file is part of weboob. -# -# weboob is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# weboob is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with weboob. If not, see . - -import re - -def id2url(_id): - "return an url from an id" - regexp2 = re.compile("(\w+).([0-9]+).(.*$)") - match = regexp2.match(_id) - if match: - return 'http://www.20minutes.fr/%s/%s/%s' % (match.group(1), - match.group(2), - match.group(3)) - else: - raise ValueError("id doesn't match") - - -def url2id(url): - "return an id from an url" - return url - - -def rssid(entry): - return url2id(entry.id)