git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@202 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
calvin 2000-11-22 15:32:54 +00:00
parent 4f45be77db
commit 728350db51
7 changed files with 385 additions and 185 deletions

3
debian/changelog vendored
View file

@ -4,8 +4,9 @@ linkchecker (1.2.9) unstable; urgency=low
checking; see the FAQ for detailed information
* added a man page
* setup.py: fix for distutils debugging function dump_dirs
* setup.py: fix to handle man pages correctly with bdist_rpm target
-- Bastian Kleineidam <calvin@users.sourceforge.net> Mon, 20 Nov 2000 19:47:02 +0100
-- Bastian Kleineidam <calvin@users.sourceforge.net> Wed, 22 Nov 2000 12:42:02 +0100
linkchecker (1.2.8) unstable; urgency=low

2
debian/rules vendored
View file

@ -64,7 +64,7 @@ binary-arch: build install
# dh_installpam
# dh_installinit
# dh_installcron
dh_installmanpages
dh_installmanpages linkchecker.1
# dh_installinfo
# dh_undocumented linkchecker.1
dh_installchangelogs

157
linkchecker.1 Normal file
View file

@ -0,0 +1,157 @@
.TH LINKCHECKER 1 "18 November 2000"
.SH NAME
linkchecker \- check your HTML documents for broken links
.SH SYNOPSIS
.B linkchecker
[
.I options
]
[
.I file-or-url
]
.SH DESCRIPTION
.LP
LinkChecker features
recursive checking,
multithreading,
output in colored or normal text, HTML, SQL, CSV or a sitemap
graph in GML or XML,
support for HTTP/1.1, HTTPS, FTP, mailto:, news:, nntp:,
Gopher, Telnet and local file links,
restriction of link checking with regular expression filters for URLs,
proxy support,
username/password authorization for HTTP and FTP,
robots.txt exclusion protocol support,
i18n support,
a command line interface and
a (Fast)CGI web interface (requires HTTP server)
.SH OPTIONS
For single-letter option arguments the space is not a necessity.
So \fI-o colored\fP is the same as \fI-ocolored\fP.
.TP
\fB-a, --anchors\fP
Check anchor references. Default is don't check anchors.
.TP
\fB-d, --denyallow\fP
Swap checking order to extern/intern. Default checking order is
intern/extern.
.TP
\fB-D, --debug\fP
Print debugging information.
.TP
\fB-e \fIregex\fB, --extern=\fIregex\fP
Assume urls that match the given regular expression as extern.
Only intern HTML links are checked recursively.
.TP
\fB-f \fIfile\fB, --config=\fIfile\fP
Use \fIfile\fP as configuration file. LinkChecker first searches for
~/.linkcheckerrc and then /etc/linkcheckerrc and under
Windows <path-to-program>\\linkcheckerrc.
.TP
\fB-F \fItype\fB, --file-output=\fItype\fP
Same as output, but write to a file \fIlinkchecker-out.<type>\fP.
If the file already exists, it is overwritten. You can specify this
option more than once. There is no file output for the blacklist
logger. Default is no file output.
.TP
\fB-i \fIregex\fB, --intern=\fIregex\fP
Assume URLs that match the given regular expression as intern.
LinkChecker descends recursively only to intern URLs, not to extern.
.TP
\fB-h, --help\fP
Help me! Print usage information for this program.
.TP
\fB-N \fIserver\fB, --nntp-server=\fIserver\fP
Specify an NNTP server for 'news:...' links. Default is the
environment variable NNTP_SERVER. If no host is given,
only the syntax of the link is checked.
.TP
\fB-o \fItype\fB, --output=\fItype\fP
Specify output type as \fItext\fP, \fIcolored\fP, \fIhtml\fP, \fIsql\fP,
\fIcsv\fP, \fIgml\fP, \fIxml\fP or \fIblacklist\fP.
Default type is \fItext\fP.
.TP
\fB-p \fIpwd\fB, --password=\fIpwd\fP
Try the password \fIpwd\fB for HTML and FTP authorization.
The default password is \fIguest@\fP. See also \fB-u\fP.
.TP
\fB-q, --quiet\fP
Quiet operation. This is only useful with \fB-F\fP.
.TP
\fB-r \fIdepth\fB, --recursion-level=\fIdepth\fP
Check recursively all links up to given \fIdepth\fP (depth >= 0).
Default depth is 1.
.TP
\fB-R, --robots-txt\fP
Obey the robots exclusion standard.
.TP
\fB-s, --strict\fP
Check only the syntax of extern links, do not try to connect to them.
.TP
\fB-t \fInum\fB, --threads=\fInum\fP
Generate no more than \fInum\fP threads. Default number of threads is 5.
To disable threading specify a non-positive number.
.TP
\fB-u \fIname\fB, --user=\fIname\fP
Try username \fIname\fP for HTML and FTP authorization.
Default is \fIanonymous\fP. See also \fB-p\fP.
.TP
\fB-V, --version\fP
Print version and exit.
.TP
\fB-v, --verbose\fP
Log all checked URLs (implies \fB-w\fP). Default is to log only invalid
URLs.
.TP
\fB-w, --warnings\fP
Log warnings.
.TP
\fB-W \fIregex\fB, --warning-regex=\fIregex\fP
Define a regular expression which prints a warning if it matches any
content of the checked link.
This applies of course only to pages which are valid, so we can get
their content.
Use this to check for pages that contain some form of error, for example
'This page has moved' or 'Oracle Application Server error'.
This option implies \fB-w\fP.
.SH NOTES
Linkchecker assumes an \fIhttp://\fP resp. \fIftp://\fP link when a
commandline URL starts with \fIwww.\fP resp. \fIftp.\fP
You can also give local files as arguments.
If you have your system configured to automatically establish a
connection to the internet (e.g. with diald), it will connect when
checking links not pointing to your local host.
Use the -s and -i options to prevent this.
Javascript links are currently ignored.
If your platform does not support threading, LinkChecker uses
\fB-t0\fP.
You can supply multiple user/password pairs in a configuration file.
Cookies are not accepted by LinkChecker.
To use proxies set $http_proxy, $https_proxy on Unix or Windows.
On a Mac use the Internet Config.
When checking 'news:' links the given NNTP host doesn't need to be the
same as the host of the user browsing your pages!
.SH EXAMPLES
\fIlinkchecker -v -ohtml -s -itreasure.calvinsplayground.de \\
.br
http://treasure.calvinsplayground.de/~calvin/
\fPLocal files and syntactic sugar on the command line:
.br
\fIlinkchecker c:\\temp\\test.html
.br
linkchecker ../bla.html
.br
linkchecker www.myhomepage.de
.br
linkchecker -r0 ftp.linux.org\fP
.SH AUTHOR
Bastian Kleineidam <calvin@users.sourceforge.net>

185
po/de.po
View file

@ -37,6 +37,26 @@ msgstr "Ergebnis"
msgid "Warning"
msgstr "Warnung"
#, fuzzy
msgid ""
"EXAMPLES\n"
"o linkchecker -v -ohtml -r2 -s -itreasure.calvinsplayground.de \\\n"
" http://treasure.calvinsplayground.de/~calvin/ > sample.html\n"
"o Local files and syntactic sugar on the command line:\n"
" linkchecker c:\\temp\\test.html\n"
" linkchecker ../bla.html\n"
" linkchecker www.myhomepage.de\n"
" linkchecker -r0 ftp.linux.org\n"
msgstr ""
"BEISPIELE\n"
"o linkchecker -v -ohtml -r2 -s -itreasure.calvinsplayground.de \\\n"
" http://treasure.calvinsplayground.de/~calvin/\n"
"o Lokale Dateien und syntaktischer Zucker in der Kommandozeile:\n"
" linkchecker c:\\temp\\test.html\n"
" linkchecker ../bla.html\n"
" linkchecker www.myhomepage.de\n"
" linkchecker -r0 ftp.linux.org\n"
msgid "%.3f seconds"
msgstr "%.3f Sekunden"
@ -91,91 +111,18 @@ msgstr "1 Warnung, "
msgid "Illegal argument '%s' for option "
msgstr "Ungültiges Argument '%s' für Option "
msgid "hours"
msgstr "Stunden"
#, fuzzy
msgid "HTTPS url ignored"
msgstr "Javascript url ignoriert"
msgid "Start checking at %s\n"
msgstr "Beginne Prüfen am %s\n"
msgid "D/L Time"
msgstr "D/L Zeit"
msgid "seconds"
msgstr "Sekunden"
msgid "URL"
msgstr "URL"
msgid ""
"EXAMPLES\n"
"o linkchecker -v -o html -r2 -s -i treasure.calvinsplayground.de \\\n"
" http://treasure.calvinsplayground.de/~calvin/ > sample.html\n"
"o Local files and syntactic sugar on the command line:\n"
" linkchecker c:\\temp\\test.html\n"
" linkchecker ../bla.html\n"
" linkchecker www.myhomepage.de\n"
" linkchecker -r0 ftp.linux.org\n"
msgstr ""
"BEISPIELE\n"
"o linkchecker -v -o html -r2 -s -i treasure.calvinsplayground.de \\\n"
" http://treasure.calvinsplayground.de/~calvin/ > sample.html\n"
"o Lokale Dateien und syntaktischer Zucker in der Kommandozeile:\n"
" linkchecker c:\\temp\\test.html\n"
" linkchecker ../bla.html\n"
" linkchecker www.myhomepage.de\n"
" linkchecker -r0 ftp.linux.org\n"
msgid "URL is null or empty"
msgstr "URL ist Null oder leer"
msgid " in %d links"
msgstr " in %d URLs"
msgid " errors"
msgstr " Fehler"
msgid "Info"
msgstr "Info"
msgid "illegal recursionlevel number %d"
msgstr "illegale recursionlevel Nummer %d"
msgid "Execute 'linkchecker -h' for help\n"
msgstr "Führen Sie 'linkchecker -h' aus, um Hilfe zu erhalten\n"
msgid "HTTP 301 (moved permanent) encountered: you should update this link"
msgstr ""
"HTTP 301 (moved permanent) gefunden: Sie sollten diesen Link aktualisieren"
msgid "Base"
msgstr "Basis"
msgid "Check Time"
msgstr "Prüfzeit"
msgid "Stopped checking at %s"
msgstr "Beende Prüfen am %s"
msgid "Group %s has %s articles, range %s to %s"
msgstr "Gruppe %s hat %s Artikel, von %s bis %s"
msgid "No user or password found"
msgstr "Kein Benutzername oder Passwort gefunden"
msgid "Get the newest version at %s\n"
msgstr "Die neueste Version gibt es unter %s\n"
#, fuzzy
msgid ""
"USAGE\tlinkchecker [options] file-or-url...\n"
"\n"
"OPTIONS\n"
"For single-letter option arguments the space is not a necessity. So\n"
"'-o colored' is the same as '-ocolored'.\n"
"-a, --anchors\n"
" Check anchor references. Default is don't check anchors.\n"
"-d, --denyallow\n"
" Swap checking order to extern/intern. Default checking order\n"
" is intern/extern.\n"
"-D, --debug\n"
" Print additional debugging information.\n"
"-e regex, --extern=regex\n"
@ -196,9 +143,6 @@ msgid ""
"extern.\n"
"-h, --help\n"
" Help me! Print usage information for this program.\n"
"-l, --allowdeny\n"
" Swap checking order to intern/extern. Default checking order\n"
" is extern/intern.\n"
"-N server, --nntp-server=server\n"
" Specify an NNTP server for 'news:...' links. Default is the\n"
" environment variable NNTP_SERVER. If no host is given,\n"
@ -246,6 +190,9 @@ msgstr ""
"OPTIONEN\n"
"-a, --anchors\n"
" Prüfe interne URLs. Standard ist keine Prüfung.\n"
"-d, --denyallow\n"
" Tausche die Prüfreihenfolge zu extern/intern. Standardmäßige\n"
" Reihenfolge ist intern/extern.\n"
"-D, --debug\n"
" Drucke zusätzlich Debug Information.\n"
"-e regex, --extern=regex\n"
@ -255,9 +202,9 @@ msgstr ""
" Benutze file als Konfigurationsdatei. LinkChecker sucht zuerst\n"
" ~/.linkcheckerrc und dann /etc/linkcheckerrc\n"
" (unter Windows <Pfad-zum-Programm>\\linkcheckerrc).\n"
"-F name, --file-output=name\n"
"-F type, --file-output=type\n"
" Wie --output, aber schreibe in eine Datei (Standard ist\n"
" linkchecker-out.<name>)\n"
" linkchecker-out.<type>)\n"
" Falls die Datei bereits existiert wird sie überschrieben.\n"
" Sie können diese Option mehr als einmal verwenden. Es gibt keine\n"
" Ausgabedatei für den blacklist Logger. Standard ist keine Ausgabe\n"
@ -266,16 +213,13 @@ msgstr ""
" Behandle URLs welche diese Ausdruck matchen als intern.\n"
"-h, --help\n"
" Hilf mir! Druche Nutzungsinformation für dieses Programm.\n"
"-l, --allowdeny\n"
" Vertausche die Prüfreihenfolge zu intern/extern. Standardmäßige\n"
" Reihenfolge ist extern/intern.\n"
"-N, --nntp-server\n"
" Gibt ein NNTP Rechner für 'news:...' Links. Standard ist die\n"
" Umgebungsvariable NNTP_SERVER. Falls kein Rechner angegeben ist,\n"
" wird lediglich auf korrekte Syntax des Links geprüft.\n"
"-o name, --output=name\n"
" Verwende die Ausgabe %s.\n"
" Standard ist text.\n"
"-o type, --output=type\n"
" Verwende die Ausgabe als %s.\n"
" Standard Ausgabe ist text.\n"
"-p pwd, --password=pwd\n"
" Verwende das angegebene Passwort für HTML und FTP Authorisation.\n"
" Standard ist 'guest@'. Siehe -u.\n"
@ -299,7 +243,7 @@ msgstr ""
"-V, --version\n"
" Drucke die Version und beende das Programm.\n"
"-v, --verbose\n"
" Logge alle geprüften URLs (nimmt -w an). Standard ist es, nur\n"
" Logge alle geprüften URLs (impliziert -w). Standard ist es, nur\n"
" fehlerhafte URLs zu loggen.\n"
"-w, --warnings\n"
" Logge Warnungen.\n"
@ -310,7 +254,66 @@ msgstr ""
" bekommen können.\n"
" Sie können dies verwenden, um Seiten mit Fehlermeldungen wie z.B.\n"
" 'Diese Seite ist umgezogen' oder 'Oracle Server Fehler'.\n"
" Diese Option nimmt -w an.\n"
" Diese Option impliziert -w.\n"
msgid "hours"
msgstr "Stunden"
#, fuzzy
msgid "HTTPS url ignored"
msgstr "Javascript url ignoriert"
msgid "Start checking at %s\n"
msgstr "Beginne Prüfen am %s\n"
msgid "D/L Time"
msgstr "D/L Zeit"
msgid "seconds"
msgstr "Sekunden"
msgid "URL"
msgstr "URL"
msgid "URL is null or empty"
msgstr "URL ist Null oder leer"
msgid " in %d links"
msgstr " in %d URLs"
msgid " errors"
msgstr " Fehler"
msgid "Info"
msgstr "Info"
msgid "illegal recursionlevel number %d"
msgstr "illegale recursionlevel Nummer %d"
msgid "Execute 'linkchecker -h' for help\n"
msgstr "Führen Sie 'linkchecker -h' aus, um Hilfe zu erhalten\n"
msgid "HTTP 301 (moved permanent) encountered: you should update this link"
msgstr ""
"HTTP 301 (moved permanent) gefunden: Sie sollten diesen Link aktualisieren"
msgid "Base"
msgstr "Basis"
msgid "Check Time"
msgstr "Prüfzeit"
msgid "Stopped checking at %s"
msgstr "Beende Prüfen am %s"
msgid "Group %s has %s articles, range %s to %s"
msgstr "Gruppe %s hat %s Artikel, von %s bis %s"
msgid "No user or password found"
msgstr "Kein Benutzername oder Passwort gefunden"
msgid "Get the newest version at %s\n"
msgstr "Die neueste Version gibt es unter %s\n"
msgid "Got no answer from FTP server"
msgstr "Keine Antwort vom FTP Server"

175
po/fr.po
View file

@ -37,6 +37,26 @@ msgstr "R
msgid "Warning"
msgstr "Avertissement"
#, fuzzy
msgid ""
"EXAMPLES\n"
"o linkchecker -v -ohtml -r2 -s -itreasure.calvinsplayground.de \\\n"
" http://treasure.calvinsplayground.de/~calvin/ > sample.html\n"
"o Local files and syntactic sugar on the command line:\n"
" linkchecker c:\\temp\\test.html\n"
" linkchecker ../bla.html\n"
" linkchecker www.myhomepage.de\n"
" linkchecker -r0 ftp.linux.org\n"
msgstr ""
"EXEMPLES\n"
"o linkchecker -v -ohtml -r2 -s -itreasure.calvinsplayground.de \\\n"
" http://treasure.calvinsplayground.de/~calvin/\n"
"o Fichiers locaux et morceau syntaxique dans la ligne de commande:\n"
" linkchecker c:\\temp\\test.html\n"
" linkchecker ../bla.html\n"
" linkchecker www.myhomepage.de\n"
" linkchecker -r0 ftp.linux.org\n"
msgid "%.3f seconds"
msgstr "%.3f secondes"
@ -83,90 +103,18 @@ msgstr "1 avertissement, "
msgid "Illegal argument '%s' for option "
msgstr "Argumen illégal '%s' pour l'option "
msgid "hours"
msgstr "heures"
#, fuzzy
msgid "HTTPS url ignored"
msgstr "Url Javascript ignorée"
msgid "Start checking at %s\n"
msgstr "Démarrage du controle à %s\n"
msgid "D/L Time"
msgstr "Durée D/L"
msgid "seconds"
msgstr "secondes"
msgid "URL"
msgstr ""
msgid ""
"EXAMPLES\n"
"o linkchecker -v -o html -r2 -s -i treasure.calvinsplayground.de \\\n"
" http://treasure.calvinsplayground.de/~calvin/ > sample.html\n"
"o Local files and syntactic sugar on the command line:\n"
" linkchecker c:\\temp\\test.html\n"
" linkchecker ../bla.html\n"
" linkchecker www.myhomepage.de\n"
" linkchecker -r0 ftp.linux.org\n"
msgstr ""
"EXEMPLES\n"
"o linkchecker -v -o html -r2 -s -i treasure.calvinsplayground.de \\\n"
" http://treasure.calvinsplayground.de/~calvin/ > sample.html\n"
"o Fichiers locaux et morceau syntaxique dans la ligne de commande:\n"
" linkchecker c:\\temp\\test.html\n"
" linkchecker ../bla.html\n"
" linkchecker www.myhomepage.de\n"
" linkchecker -r0 ftp.linux.org\n"
msgid "URL is null or empty"
msgstr "L'URL est nulle ou vide"
msgid " in %d links"
msgstr " dans %d liens"
msgid " errors"
msgstr " erreurs"
msgid "Info"
msgstr ""
msgid "illegal recursionlevel number %d"
msgstr "valeur du niveau de récursivité %d illégal"
msgid "Execute 'linkchecker -h' for help\n"
msgstr "Exécuter 'linkchecker -h' pour obtenir l'aide\n"
msgid "HTTP 301 (moved permanent) encountered: you should update this link"
msgstr "HTTP 301 (déplacé) rencontré: vous devez mettre à jour ce lien"
msgid "Base"
msgstr "Base"
msgid "Check Time"
msgstr "Durée d'Analyse"
msgid "Stopped checking at %s"
msgstr "Arrêt du controle à %s"
msgid "Group %s has %s articles, range %s to %s"
msgstr "Le groupe %s a %s articles, de %s à %s"
msgid "No user or password found"
msgstr "Aucun utilisateur ou mot de passe trouvé"
msgid "Get the newest version at %s\n"
msgstr "Obtenir la dernière version à %s\n"
#, fuzzy
msgid ""
"USAGE\tlinkchecker [options] file-or-url...\n"
"\n"
"OPTIONS\n"
"For single-letter option arguments the space is not a necessity. So\n"
"'-o colored' is the same as '-ocolored'.\n"
"-a, --anchors\n"
" Check anchor references. Default is don't check anchors.\n"
"-d, --denyallow\n"
" Swap checking order to extern/intern. Default checking order\n"
" is intern/extern.\n"
"-D, --debug\n"
" Print additional debugging information.\n"
"-e regex, --extern=regex\n"
@ -187,9 +135,6 @@ msgid ""
"extern.\n"
"-h, --help\n"
" Help me! Print usage information for this program.\n"
"-l, --allowdeny\n"
" Swap checking order to intern/extern. Default checking order\n"
" is extern/intern.\n"
"-N server, --nntp-server=server\n"
" Specify an NNTP server for 'news:...' links. Default is the\n"
" environment variable NNTP_SERVER. If no host is given,\n"
@ -238,6 +183,9 @@ msgstr ""
"-a, --anchors\n"
" Contrôle les références ancrées. Par défaut, il ne les contrôle "
"pas.\n"
"-d, --denyallow\n"
" Swap checking order to extern/intern. Default checking order\n"
" is intern/extern.\n"
"-D, --debug\n"
" Affiche des informations de débugage supplémentaires.\n"
"-e regex, --extern=regex\n"
@ -260,9 +208,6 @@ msgstr ""
" Assume urls that match the given expression as intern.\n"
"-h, --help\n"
" Aide moi! Affiche les informations d'utilisation pour ce programme.\n"
"-l, --allowdeny\n"
" Swap checking order to intern/extern. Default checking order\n"
" is extern/intern.\n"
"-N, --nntp-server\n"
" Specify an NNTP server for 'news:...' links. Default is the\n"
" environment variable NNTP_SERVER. If no host is given,\n"
@ -307,6 +252,64 @@ msgstr ""
" 'Oracle Application Server error'.\n"
" This option implies -w.\n"
msgid "hours"
msgstr "heures"
#, fuzzy
msgid "HTTPS url ignored"
msgstr "Url Javascript ignorée"
msgid "Start checking at %s\n"
msgstr "Démarrage du controle à %s\n"
msgid "D/L Time"
msgstr "Durée D/L"
msgid "seconds"
msgstr "secondes"
msgid "URL"
msgstr ""
msgid "URL is null or empty"
msgstr "L'URL est nulle ou vide"
msgid " in %d links"
msgstr " dans %d liens"
msgid " errors"
msgstr " erreurs"
msgid "Info"
msgstr ""
msgid "illegal recursionlevel number %d"
msgstr "valeur du niveau de récursivité %d illégal"
msgid "Execute 'linkchecker -h' for help\n"
msgstr "Exécuter 'linkchecker -h' pour obtenir l'aide\n"
msgid "HTTP 301 (moved permanent) encountered: you should update this link"
msgstr "HTTP 301 (déplacé) rencontré: vous devez mettre à jour ce lien"
msgid "Base"
msgstr "Base"
msgid "Check Time"
msgstr "Durée d'Analyse"
msgid "Stopped checking at %s"
msgstr "Arrêt du controle à %s"
msgid "Group %s has %s articles, range %s to %s"
msgstr "Le groupe %s a %s articles, de %s à %s"
msgid "No user or password found"
msgstr "Aucun utilisateur ou mot de passe trouvé"
msgid "Get the newest version at %s\n"
msgstr "Obtenir la dernière version à %s\n"
msgid "Got no answer from FTP server"
msgstr "N'obtient pas de réponse du serveur FTP"
@ -354,11 +357,11 @@ msgstr ""
"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 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 Les cookies ne sont pas acceptés par LinkChecker\n"
"le fichier de configuration.\n"
"o Les cookies ne sont pas acceptés par LinkChecker.\n"
"o To use proxies set $http_proxy, $https_proxy on Unix or Windows.\n"
" On a Mac use the Internet Config.\n"
"o Lors d'un contrôle des liens 'news:', l'hôte NNTP spécifié n'a pas besoin "

View file

@ -8,5 +8,6 @@ doc_files = INSTALL
lconline/
test/
tests/
linkchecker.1
provides = linkchecker
group = Web/Utilities

View file

@ -21,13 +21,14 @@ from distutils.core import setup, DEBUG
from distutils.dist import Distribution
from distutils.extension import Extension
from distutils.command.install import install
from distutils.command.install_data import install_data
from distutils.command.config import config
from distutils import util
from distutils.file_util import write_file
import os,string
import os,string,re
class LCInstall(install):
class MyInstall(install):
def run(self):
install.run(self)
# we have to write a configuration file because we need the
@ -65,7 +66,38 @@ class LCInstall(install):
print " %s: %s" % (opt_name, val)
class LCConfig(config):
class MyInstallData(install_data):
"""My own data installer to handle .man pages"""
def run (self):
self.mkpath(self.install_dir)
for f in self.data_files:
if type(f) == StringType:
# it's a simple file, so copy it
if self.warn_dir:
self.warn("setup script did not provide a directory for "
"'%s' -- installing right in '%s'" %
(f, self.install_dir))
self._install_file(f, self.install_dir)
else:
# it's a tuple with path to install to and a list of files
dir = f[0]
if not os.path.isabs(dir):
dir = os.path.join(self.install_dir, dir)
elif self.root:
dir = change_root(self.root, dir)
self.mkpath(dir)
for data in f[1]:
self._install_file(data, dir)
def _install_file(self, filename, dirname):
(out, _) = self.copy_file(filename, dirname)
# match for man pages .[0-9]
if re.search(r'/man/.+\.\d$', out):
out = out+".gz"
self.outfiles.append(out)
class MyConfig(config):
user_options = config.user_options + [
('ssl-include-dirs=', None,
"directories to search for SSL header files"),
@ -137,7 +169,7 @@ class LCConfig(config):
self.distribution.create_conf_file(".", data)
class LCDistribution(Distribution):
class MyDistribution(Distribution):
def __init__(self, attrs=None):
Distribution.__init__(self, attrs=attrs)
self.config_file = self.get_name()+"Conf.py"
@ -207,8 +239,11 @@ o i18n support
o a command line interface
o a (Fast)CGI web interface (requires HTTP server)
""",
distclass = LCDistribution,
cmdclass = {'config': LCConfig, 'install': LCInstall},
distclass = MyDistribution,
cmdclass = {'config': MyConfig,
'install': MyInstall,
'install_data': MyInstallData,
},
packages = ['','DNS','linkcheck'],
scripts = ['linkchecker'],
data_files = [('share/locale/de/LC_MESSAGES',