git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@130 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
calvin 2000-07-10 21:55:30 +00:00
parent e02e32d5f6
commit 24b9c618e7
12 changed files with 129 additions and 48 deletions

View file

@ -30,6 +30,7 @@ linkcheck/TelnetUrlData.py \
linkcheck/Threader.py \
linkcheck/UrlData.py \
linkcheck/__init__.py.tmpl \
linkcheck/lc_cgi.py \
linkchecker
DESTDIR=/.

View file

@ -29,7 +29,9 @@ HtmlTable = [
("<","&lt;"),
(">","&gt;"),
("é","&eacute;"),
("č","&egrave;")
("è","&egrave;"),
("à","&agrave;"),
("ç","&ccedil;"),
]
SQLTable = [

1
debian/changelog vendored
View file

@ -2,6 +2,7 @@ linkchecker (1.2.4) unstable; urgency=low
* Fixed parsing of /etc/resolv.conf with empty lines
* french translation from Jerome Couderc <j.couderc@ifrance.com>
* CGI script fixes
-- Bastian Kleineidam <calvin@users.sourceforge.net> Tue, 27 Jun 2000 00:34:30 +0200

14
lc.cgi
View file

@ -14,8 +14,6 @@ def testit():
cgi.test()
sys.exit(0)
import linkcheck
# main
print "Content-type: text/html"
print "Cache-Control: no-cache"
@ -23,14 +21,22 @@ print
# uncomment the following line to test your CGI values
#testit()
form = cgi.FieldStorage()
if form['language'].value == 'de':
os.environ['LC_MESSAGES'] = 'de'
elif form['language'].value == 'fr':
os.environ['LC_MESSAGES'] = 'fr'
else:
os.environ['LC_MESSAGES'] = 'C'
import linkcheck
if not linkcheck.lc_cgi.checkform(form):
linkcheck.lc_cgi.logit(form, form)
linkcheck.lc_cgi.printError(sys.stdout)
sys.exit(0)
config = linkcheck.Config.Configuration()
config["recursionlevel"] = int(form["level"].value)
config.newLogger('html')
if form.has_key("anchors"): config["anchors"] = 1
config['log'] = config.newLogger('html')
if form.has_key('strict'): config['strict'] = 1
if form.has_key("anchors"): config["anchors"] = 1
if not form.has_key("errors"): config["verbose"] = 1
if form.has_key("intern"):
config["internlinks"].append(re.compile("^(ftp|https?)://"+\

View file

@ -22,7 +22,8 @@ try:
config["recursionlevel"] = int(form["level"].value)
config["log"] = config.newLogger('html', {'fd':req.out})
config.disableThreading()
if form.has_key("anchors"): config["anchors"] = 1
if form.has_key('strict'): config['strict'] = 1
if form.has_key("anchors"): config["anchors"] = 1
if not form.has_key("errors"): config["verbose"] = 1
if form.has_key("intern"):
config["internlinks"].append(re.compile("^(ftp|https?)://"+\

View file

@ -19,7 +19,8 @@ def func(fcg, req):
config["recursionlevel"] = int(form["level"].value)
config["log"] = config.newLogger('html', {'fd':req.out})
config.disableThreading()
if form.has_key("anchors"): config["anchors"] = 1
if form.has_key('strict'): config['strict'] = 1
if form.has_key("anchors"): config["anchors"] = 1
if not form.has_key("errors"): config["verbose"] = 1
if form.has_key("intern"):
config["internlinks"].append(re.compile("^(ftp|https?)://"+\

View file

@ -11,14 +11,16 @@
</center>
<blockquote>
<form method="POST" action="http://YOURCGIHOSTHERE/cgi-bin/lc.cgi"
<form method="POST"
action="http://treasure.calvinsplayground.de/cgi-bin/calvin/lc.cgi"
target="links">
<table border=0>
<tr><td colspan=2 bgcolor="#fff7e5">
<font face="Lucida,Verdana,Arial,sans-serif">URL:
<input size=70 name="url" value="http://">
<input type="submit" value="Go!"></font></td></tr>
<td><font face="Lucida,Verdana,Arial,sans-serif">Recursion Level: <select name="level">
<td><font face="Lucida,Verdana,Arial,sans-serif">Recursion Level:
<select name="level">
<option> 0
<option selected> 1
<option> 2
@ -34,7 +36,21 @@ Log only errors: <input type="checkbox" name="errors">
</font></td>
<td><font face="Lucida,Verdana,Arial,sans-serif">
Check only intern links: <input type="checkbox" name="intern" checked>
</font></td></tr></table>
</font></td>
</tr>
<tr>
<td><font face="Lucida,Verdana,Arial,sans-serif">
Output language: <select name="language">
<option selected> English
<option value="de"> Deutsch
<option value="fr"> Fran&ccedil;ais
</select>
</font></td>
<td><font face="Lucida,Verdana,Arial,sans-serif">
Check strict intern links: <input type="checkbox" name="strict">
</font></td>
</tr>
</table>
</blockquote>
</font>
</body></html>

View file

@ -35,6 +35,7 @@ def dictjoin(d1, d2):
d[key] = d2[key]
return d
Version = "1.2.3"
AppName = "LinkChecker"
App = AppName+" "+Version
@ -149,6 +150,7 @@ class Configuration(UserDict.UserDict):
self.data['blacklist'] = {
"filename": "~/.blacklist",
}
# default values
self.data['log'] = self.newLogger('text')
self.data["quiet"] = 0
self.data["warningregex"] = None

View file

@ -265,7 +265,7 @@ class HtmlLogger(StandardLogger):
self.fd.write(_(" in 1 link"))
else:
self.fd.write(_(" in %d links") % linknumber)
self.fd.write(" found<br>\n")
self.fd.write(_(" found\n")+"<br>")
self.stoptime = time.time()
duration = self.stoptime - self.starttime
name = _("seconds")

View file

@ -16,6 +16,7 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
"""
import re,time,urlparse
from linkcheck import _
def checkform(form):
for key in ["level","url"]:
@ -48,15 +49,15 @@ def logit(form, env, file = "linkchecker.log"):
log.close()
def printError(out):
out.write("""<html><head><title>LinkChecker Online Error</title></head>
<body text="#192c83" bgcolor="#fff7e5" link="#191c83" vlink="#191c83"
alink="#191c83">
<blockquote>
<b>Error</b><br>
The LinkChecker Online script has encountered an error. Please ensure
that your provided URL link begins with <code>http://</code> and
contains only these characters: <code>A-Za-z0-9./_~-</code><br><br>
Errors are logged.
</blockquote>
</body>
</html>""")
out.write(_("<html><head><title>LinkChecker Online Error</title></head>"
"<body text=\"#192c83\" bgcolor=\"#fff7e5\" link=\"#191c83\" vlink=\"#191c83\""
"alink=\"#191c83\">"
"<blockquote>"
"<b>Error</b><br>"
"The LinkChecker Online script has encountered an error. Please ensure "
"that your provided URL link begins with <code>http://</code> and "
"contains only these characters: <code>A-Za-z0-9./_~-</code><br><br>"
"Errors are logged."
"</blockquote>"
"</body>"
"</html>"))

View file

@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2000-06-22 01:50+0200\n"
"POT-Creation-Date: 2000-07-10 23:52+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -63,6 +63,24 @@ msgstr "1 Fehler"
msgid "1 warning, "
msgstr "1 Warnung, "
msgid ""
"<html><head><title>LinkChecker Online Error</title></head><body "
"text=\"#192c83\" bgcolor=\"#fff7e5\" link=\"#191c83\" "
"vlink=\"#191c83\"alink=\"#191c83\"><blockquote><b>Error</b><br>The "
"LinkChecker Online script has encountered an error. Please ensure that your "
"provided URL link begins with <code>http://</code> and contains only these "
"characters: <code>A-Za-z0-9./_~-</code><br><br>Errors are "
"logged.</blockquote></body></html>"
msgstr ""
"<html><head><title>LinkChecker Online Fehler</title></head><body "
"text=\"#192c83\" bgcolor=\"#fff7e5\" link=\"#191c83\" "
"vlink=\"#191c83\"alink=\"#191c83\"><blockquote><b>Fehler</b><br>Das "
"LinkChecker Online Skript ist auf einen Fehler gesto&szlig;en. Bitte stellen "
"Sie sicher, da&szlig; die angegebene URL mit <code>http://</code> beginnt "
"und nur diese Zeichen enth&auml;lt: "
"<code>A-Za-z0-9./_~-</code><br><br>Fehler werden geloggt. "
"</blockquote></body></html>"
msgid "Access denied by robots.txt, checked only syntax"
msgstr "Zugriff verweigert durch robots.txt; prüfe lediglich Syntax"
@ -386,6 +404,10 @@ msgstr ""
msgid "could not split the mail adress"
msgstr "konnte Mail Adresse nicht splitten"
#, c-format
msgid "created by %s at %s\n"
msgstr "erstellt von %s um %s\n"
msgid "found"
msgstr "gefunden"

View file

@ -1,18 +1,18 @@
# French catalog for linkchecker.
# Copyright (C) 2000 Free Software Foundation, Inc.
# Jerome Couderc <j.couderc@ifrance.com>, 2000.
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR Free Software Foundation, Inc.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: linkchecker-1.2.3\n"
"POT-Creation-Date: 2000-06-22 01:50+0200\n"
"PO-Revision-Date: 2000-06-26 15:30+0100\n"
"Last-Translator: Jerome Couderc <j.couderc@ifrance.com>\n"
"Language-Team: French <fr@li.org>\n"
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2000-07-10 23:52+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=iso-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: ENCODING\n"
msgid ""
"\n"
@ -60,6 +60,16 @@ msgstr "1 erreur"
msgid "1 warning, "
msgstr "1 avertissement, "
msgid ""
"<html><head><title>LinkChecker Online Error</title></head><body "
"text=\"#192c83\" bgcolor=\"#fff7e5\" link=\"#191c83\" "
"vlink=\"#191c83\"alink=\"#191c83\"><blockquote><b>Error</b><br>The "
"LinkChecker Online script has encountered an error. Please ensure that your "
"provided URL link begins with <code>http://</code> and contains only these "
"characters: <code>A-Za-z0-9./_~-</code><br><br>Errors are "
"logged.</blockquote></body></html>"
msgstr ""
msgid "Access denied by robots.txt, checked only syntax"
msgstr "Accès refusé par robots.txt, analyse de la syntaxe seulement"
@ -158,18 +168,22 @@ msgid ""
" same as the host of the user browsing your pages!\n"
msgstr ""
"NOTES\n"
"o LinkChecker suppose qu'il s'agit de liens http:// et respectivement ftp:// lorsque l'URL\n"
"o LinkChecker suppose qu'il s'agit de liens http:// et respectivement ftp:// "
"lorsque l'URL\n"
" de la ligne de commande commence par 'www.' et respectivement 'ftp.'\n"
" Vous pouvez aussi donner des fichiers locaux comme arguments\n"
"o Si votre systeme est configuré pour établir automatiquement une\n"
" connexion à internet (e.g. with diald), il se connectera lorsque les liens\n"
" connexion à internet (e.g. with diald), il se connectera lorsque les "
"liens\n"
" contrôlés ne pointent pas vers votre réseau local\n"
" Utiliser l'option -s et -i pour l'éviter (voir EXEMPLES)\n"
"o Les liens Javascript sont actuellement ignorés\n"
"o If your platform does not support threading, LinkChecker uses -t0\n"
"o Vous pouvez fournir plusieurs couples 'utilisateurs'/'mots de passe' dans le fichier de configuration\n"
"o Vous pouvez fournir plusieurs couples 'utilisateurs'/'mots de passe' dans "
"le fichier de configuration\n"
"o Les cookies ne sont pas acceptés par LinkChecker\n"
"o Lors d'un contrôle des liens 'news:', l'hôte NNTP spécifié n'a pas besoin d'être le\n"
"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 "No NNTP server specified, checked only syntax"
@ -285,21 +299,26 @@ msgstr ""
"\n"
"OPTIONS\n"
"-a, --anchors\n"
" Contrôle les références ancrées. Par défaut, il ne les contrôle pas.\n"
" Contrôle les références ancrées. Par défaut, il ne les contrôle "
"pas.\n"
"-D, --debug\n"
" Affiche des informations de débugage supplémentaires.\n"
"-e regex, --extern=regex\n"
" Assume urls that match the given expression as extern.\n"
" Only intern HTTP links are checked recursively.\n"
"-f file, --config=file\n"
" Utilise le fichier comme fichier de configuration. LinkChecker recherche d'abord\n"
" Utilise le fichier comme fichier de configuration. LinkChecker "
"recherche d'abord\n"
" ~/.linkcheckerrc puis /etc/linkcheckerrc\n"
" (sous Windows <chemin-vers-le-programe>\\linkcheckerrc).\n"
"-F name, --file-output=name\n"
" Identique à output, mais écrit dans un fichier linkchecker-out.<nom>.\n"
" Identique à output, mais écrit dans un fichier "
"linkchecker-out.<nom>.\n"
" Si le fichier existe, il sera écrasé. Vous pouvez spécifier\n"
" cette option plus d'une fois. Il n'y a pas de fichier de sotie pour les\n"
" logs de la liste noire. Par défaut, il n'y a pas de fichier de sortie.\n"
" cette option plus d'une fois. Il n'y a pas de fichier de sotie pour "
"les\n"
" logs de la liste noire. Par défaut, il n'y a pas de fichier de "
"sortie.\n"
"-i regex, --intern=regex\n"
" Assume urls that match the given expression as intern.\n"
"-h, --help\n"
@ -328,7 +347,8 @@ msgstr ""
"-R, --robots-txt\n"
" Obey the robots exclusion standard.\n"
"-s, --strict\n"
" Contrôle seulement la syntaxe des liens externes, et ne pas essayer de s'y connecter.\n"
" Contrôle seulement la syntaxe des liens externes, et ne pas essayer "
"de s'y connecter.\n"
"-t num, --threads=num\n"
" Generate no more than num threads. Default number of threads is 5.\n"
" To disable threading specify a non-positive number.\n"
@ -338,7 +358,8 @@ msgstr ""
"-V, --version\n"
" Affiche la version et quitte.\n"
"-v, --verbose\n"
" Logger toutes les URLs contôlées (suppose -w). Par défaut, seulement les URLS\n"
" Logger toutes les URLs contôlées (suppose -w). Par défaut, seulement "
"les URLS\n"
" invalides sont logguées.\n"
"-w, --warnings\n"
" Logger les avertissements.\n"
@ -359,12 +380,20 @@ msgid "Warning"
msgstr "Avertissement"
#, c-format
msgid "Write comments and bugs to %s\n\n"
msgstr "Ecrire les commentaires et rapport de bug à %s\n\n"
msgid ""
"Write comments and bugs to %s\n"
"\n"
msgstr ""
"Ecrire les commentaires et rapport de bug à %s\n"
"\n"
msgid "could not split the mail adress"
msgstr "impossible de partager l'adresse e-mail"
#, c-format
msgid "created by %s at %s\n"
msgstr ""
msgid "found"
msgstr "trouvé"
@ -406,4 +435,3 @@ msgstr "secondes"
msgid "warning: no files or urls given"
msgstr "attention: aucun fichier ou url donnée"