mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-04-01 21:50:25 +00:00
new ChromeUrlData for chrome: links in Mozilla
git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@311 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
parent
079a8735a6
commit
40dbe111ee
5 changed files with 77 additions and 30 deletions
4
debian/changelog
vendored
4
debian/changelog
vendored
|
|
@ -4,8 +4,10 @@ linkchecker (1.3.9) unstable; urgency=low
|
|||
* on Windows, install a .bat file on the Desktop (with interactive
|
||||
input)
|
||||
* updated german .po file
|
||||
* support Mozilla-specific chrome: links
|
||||
* disable timeoutsocket, it does not work for me
|
||||
|
||||
-- Bastian Kleineidam <calvin@debian.org> Sat, 17 Nov 2001 14:02:46 +0100
|
||||
-- Bastian Kleineidam <calvin@debian.org> Sat, 17 Nov 2001 14:38:01 +0100
|
||||
|
||||
linkchecker (1.3.8) unstable; urgency=low
|
||||
|
||||
|
|
|
|||
31
linkcheck/ChromeUrlData.py
Normal file
31
linkcheck/ChromeUrlData.py
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
"""Handle Mozilla-specific chrome: links"""
|
||||
# Copyright (C) 2001 Bastian Kleineidam
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program 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 General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
from UrlData import UrlData
|
||||
from linkcheck import _
|
||||
|
||||
class ChromeUrlData(UrlData):
|
||||
"""Url link with chrome: scheme. This is found in Mozilla browsers.
|
||||
We just ignore this thing because we cannot search for a running
|
||||
Mozilla and get its MOZILLA_HOME."""
|
||||
|
||||
def check(self, config):
|
||||
self.setWarning(_("chrome: links are Mozilla-specific and will be ignored"))
|
||||
self.logMe(config)
|
||||
|
||||
def get_scheme(self):
|
||||
return "find"
|
||||
|
|
@ -463,6 +463,7 @@ class UrlData:
|
|||
return None,None
|
||||
|
||||
|
||||
from ChromeUrlData import ChromeUrlData
|
||||
from FileUrlData import FileUrlData
|
||||
from FindUrlData import FindUrlData
|
||||
from FtpUrlData import FtpUrlData
|
||||
|
|
@ -486,26 +487,31 @@ def GetUrlDataFrom(urlName, recursionLevel, parentName = None,
|
|||
url = string.lower(parentName)
|
||||
# test scheme
|
||||
if re.search("^http:", url):
|
||||
return HttpUrlData(urlName, recursionLevel, parentName, baseRef, line, name)
|
||||
if re.search("^ftp:", url):
|
||||
return FtpUrlData(urlName, recursionLevel, parentName, baseRef, line, name)
|
||||
if re.search("^file:", url):
|
||||
return FileUrlData(urlName, recursionLevel, parentName, baseRef, line, name)
|
||||
if re.search("^telnet:", url):
|
||||
return TelnetUrlData(urlName, recursionLevel, parentName, baseRef, line, name)
|
||||
if re.search("^mailto:", url):
|
||||
return MailtoUrlData(urlName, recursionLevel, parentName, baseRef, line, name)
|
||||
if re.search("^gopher:", url):
|
||||
return GopherUrlData(urlName, recursionLevel, parentName, baseRef, line, name)
|
||||
if re.search("^javascript:", url):
|
||||
return JavascriptUrlData(urlName, recursionLevel, parentName, baseRef, line, name)
|
||||
if re.search("^https:", url):
|
||||
return HttpsUrlData(urlName, recursionLevel, parentName, baseRef, line, name)
|
||||
if re.search("^(s?news|nntp):", url):
|
||||
return NntpUrlData(urlName, recursionLevel, parentName, baseRef, line, name)
|
||||
klass = HttpUrlData
|
||||
elif re.search("^ftp:", url):
|
||||
klass = FtpUrlData
|
||||
elif re.search("^file:", url):
|
||||
klass = FileUrlData
|
||||
elif re.search("^telnet:", url):
|
||||
klass = TelnetUrlData
|
||||
elif re.search("^mailto:", url):
|
||||
klass = MailtoUrlData
|
||||
elif re.search("^gopher:", url):
|
||||
klass = GopherUrlData
|
||||
elif re.search("^javascript:", url):
|
||||
klass = JavascriptUrlData
|
||||
elif re.search("^https:", url):
|
||||
klass = HttpsUrlData
|
||||
elif re.search("^(s?news|nntp):", url):
|
||||
klass = NntpUrlData
|
||||
# Mozillas Technology links start with "find:"
|
||||
if re.search("^find:", url):
|
||||
return FindUrlData(urlName, recursionLevel, parentName, baseRef, line, name)
|
||||
elif re.search("^find:", url):
|
||||
klass = FindUrlData
|
||||
# Mozilla Chrome URL
|
||||
elif re.search("^chrome:", url):
|
||||
klass = ChromeUrlData
|
||||
# assume local file
|
||||
return FileUrlData(urlName, recursionLevel, parentName, baseRef, line, name)
|
||||
else
|
||||
klass = FileUrlData
|
||||
return klass(urlName, recursionLevel, parentName, baseRef, line, name)
|
||||
|
||||
|
|
|
|||
17
po/de.po
17
po/de.po
|
|
@ -47,6 +47,10 @@ msgstr "Warnung"
|
|||
msgid "Illegal argument '%s' for option "
|
||||
msgstr "Ungültiges Argument '%s' für Option "
|
||||
|
||||
#, fuzzy
|
||||
msgid "warning: timeoutsocket is not support on this system"
|
||||
msgstr "Warnung: timeoutsocket wird auf diesem System nicht unterstützt"
|
||||
|
||||
msgid "Verified adress: %s"
|
||||
msgstr "Gültige Adresse: %s"
|
||||
|
||||
|
|
@ -202,7 +206,8 @@ msgstr ""
|
|||
" Ausgabedatei für den blacklist Logger. Standard ist keine Ausgabe\n"
|
||||
" in eine Datei.\n"
|
||||
"-I, --interactive\n"
|
||||
" Frage nach URLs, falls keine auf der Kommandozeile eingegeben wurde.\n"
|
||||
" Frage nach URLs, falls keine auf der Kommandozeile eingegeben "
|
||||
"wurde.\n"
|
||||
"-i regex, --intern=regex\n"
|
||||
" Behandle URLs welche diese Ausdruck matchen als intern.\n"
|
||||
"-h, --help\n"
|
||||
|
|
@ -333,8 +338,8 @@ msgid ""
|
|||
"redirection"
|
||||
msgstr ""
|
||||
"Es trat eine HTTP 301 Weiterleitung auf und die URL endet nicht mit /. Alle "
|
||||
"URLs, die auf (Home-) Verzeichnisse verweisen, sollten mit einem / enden, "
|
||||
"um Weiterleitungen zu verhindern"
|
||||
"URLs, die auf (Home-) Verzeichnisse verweisen, sollten mit einem / enden, um "
|
||||
"Weiterleitungen zu verhindern"
|
||||
|
||||
msgid " in %d links"
|
||||
msgstr " in %d URLs"
|
||||
|
|
@ -345,6 +350,9 @@ msgstr " Fehler"
|
|||
msgid "Info"
|
||||
msgstr "Info"
|
||||
|
||||
msgid "Hit RETURN to finish"
|
||||
msgstr ""
|
||||
|
||||
msgid "illegal recursionlevel number %d"
|
||||
msgstr "illegale recursionlevel Nummer %d"
|
||||
|
||||
|
|
@ -447,9 +455,6 @@ msgstr ""
|
|||
"o Beim Prüfen von 'news:' Links muß der angegebene NNTP Rechner nicht\n"
|
||||
" unbedingt derselbe wie der des Benutzers sein!\n"
|
||||
|
||||
msgid "warning: timeoutsocket is not supported on this system"
|
||||
msgstr "Warnung: timeoutsocket wird auf diesem System nicht unterstützt"
|
||||
|
||||
msgid "Articel number %s found"
|
||||
msgstr "Artikel nummer %s wurde gefunden"
|
||||
|
||||
|
|
|
|||
9
po/fr.po
9
po/fr.po
|
|
@ -47,6 +47,9 @@ msgstr "Avertissement"
|
|||
msgid "Illegal argument '%s' for option "
|
||||
msgstr "Argumen illégal '%s' pour l'option "
|
||||
|
||||
msgid "warning: timeoutsocket is not support on this system"
|
||||
msgstr ""
|
||||
|
||||
msgid "Verified adress: %s"
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -325,6 +328,9 @@ msgstr " erreurs"
|
|||
msgid "Info"
|
||||
msgstr ""
|
||||
|
||||
msgid "Hit RETURN to finish"
|
||||
msgstr ""
|
||||
|
||||
msgid "illegal recursionlevel number %d"
|
||||
msgstr "valeur du niveau de récursivité %d illégal"
|
||||
|
||||
|
|
@ -424,9 +430,6 @@ msgstr ""
|
|||
"o Lors d'un contrôle des liens 'news:', l'hôte NNTP spécifié n'a pas besoin d'être le\n"
|
||||
" même que l'hôte de l'utilisateur qui parcourt vos pages!\n"
|
||||
|
||||
msgid "warning: timeoutsocket not support on this platform"
|
||||
msgstr ""
|
||||
|
||||
msgid "Articel number %s found"
|
||||
msgstr ""
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue