Rename blacklist to failures

Continue to support blacklist for the time being, with deprecation
warnings.
This commit is contained in:
Chris Mayo 2020-08-23 17:19:26 +01:00
parent 54a9364960
commit 2de25d54fd
23 changed files with 683 additions and 654 deletions

View file

@ -103,9 +103,9 @@
#colorok=#3ba557
#parts=all
# blacklist logger
[blacklist]
#filename=~/.linkchecker/blacklist
# failures logger
[failures]
#filename=~/.linkchecker/failures
# custom xml logger
[xml]

View file

@ -3,6 +3,7 @@
Changes:
- cmdline: Remove options replaced by plugins and made ineffective in 9.0
- configuration: Update proxy settings support for GNOME 3.
- logging: blacklist has been renamed to failures
9.4 "just passing by" (released 12.4.2018)

View file

@ -17,7 +17,7 @@
#
# This script is intended to be run daily from cron. It complains when
# URLs fail for at least a number of script runs.
LOGFILE="$HOME/.linkchecker/blacklist"
linkchecker -Fblacklist "$@"
LOGFILE="$HOME/.linkchecker/failures"
linkchecker -Ffailures "$@"
# this awk script complains if urls fail for at least two script runs
[ -r $LOGFILE ] && awk '/^[[:digit:]]+/ {if ($1 > 1) printf "URL %s failed for %d days.", $2, $1; }' $LOGFILE

View file

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: LinkChecker \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-08-05 19:32+0100\n"
"POT-Creation-Date: 2020-08-22 16:37+0100\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"
@ -36,86 +36,90 @@ msgstr ""
msgid "Installation"
msgstr ""
#: ../../src/index.rst:25
#: ../../src/index.rst:24
msgid "See the :doc:`installation document <install>` for more information."
msgstr ""
#: ../../src/index.rst:27
msgid "Basic usage"
msgstr ""
#: ../../src/index.rst:26
#: ../../src/index.rst:28
msgid "To check a URL like *http://www.example.org/myhomepage/* it is enough to execute:"
msgstr ""
#: ../../src/index.rst:33
#: ../../src/index.rst:35
msgid "This check will validate recursively all pages starting with *http://www.example.org/myhomepage/*. Additionally, all external links pointing outside of *www.example.org* will be checked but not recursed into."
msgstr ""
#: ../../src/index.rst:39
#: ../../src/index.rst:41
msgid "Features"
msgstr ""
#: ../../src/index.rst:41
#: ../../src/index.rst:43
msgid "recursive and multithreaded checking and site crawling"
msgstr ""
#: ../../src/index.rst:42
#: ../../src/index.rst:44
msgid "output in colored or normal text, HTML, SQL, CSV, XML or a sitemap graph in different formats"
msgstr ""
#: ../../src/index.rst:44
#: ../../src/index.rst:46
msgid "HTTP/1.1, HTTPS, FTP, mailto:, news:, nntp:, Telnet and local file links support"
msgstr ""
#: ../../src/index.rst:46
#: ../../src/index.rst:48
msgid "restriction of link checking with regular expression filters for URLs"
msgstr ""
#: ../../src/index.rst:47
#: ../../src/index.rst:49
msgid "proxy support"
msgstr ""
#: ../../src/index.rst:48
#: ../../src/index.rst:50
msgid "username/password authorization for HTTP and FTP and Telnet"
msgstr ""
#: ../../src/index.rst:49
#: ../../src/index.rst:51
msgid "honors robots.txt exclusion protocol"
msgstr ""
#: ../../src/index.rst:50
#: ../../src/index.rst:52
msgid "Cookie support"
msgstr ""
#: ../../src/index.rst:51
#: ../../src/index.rst:53
msgid "HTML5 support"
msgstr ""
#: ../../src/index.rst:52
#: ../../src/index.rst:54
msgid ":ref:`Plugin support <man/linkchecker:PLUGINS>` allowing custom page checks. Currently available are HTML and CSS syntax checks, Antivirus checks, and more."
msgstr ""
#: ../../src/index.rst:54
#: ../../src/index.rst:56
msgid "Different interfaces: command line and web interface"
msgstr ""
#: ../../src/index.rst:55
#: ../../src/index.rst:57
msgid "... and a lot more check options documented in the :doc:`man/linkchecker` manual page."
msgstr ""
#: ../../src/index.rst:59
#: ../../src/index.rst:61
msgid "Screenshots"
msgstr ""
#: ../../src/index.rst:69
#: ../../src/index.rst:71
msgid "Commandline interface"
msgstr ""
#: ../../src/index.rst:70
#: ../../src/index.rst:72
msgid "WSGI web interface"
msgstr ""
#: ../../src/index.rst:73
#: ../../src/index.rst:75
msgid "Test suite status"
msgstr ""
#: ../../src/index.rst:74
#: ../../src/index.rst:76
msgid "Linkchecker has extensive unit tests to ensure code quality. `Travis CI <https://travis-ci.com/>`_ is used for continuous build and test integration."
msgstr ""

View file

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: LinkChecker \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-08-09 16:29+0100\n"
"POT-Creation-Date: 2020-08-22 16:37+0100\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"
@ -162,7 +162,7 @@ msgid "Print debugging output for the given logger. Available loggers are cmdlin
msgstr ""
#: ../../src/man/linkchecker.rst:127
msgid "Output to a file linkchecker-out.TYPE, $HOME/.linkchecker/blacklist for blacklist output, or FILENAME if specified. The ENCODING specifies the output encoding, the default is that of your locale. Valid encodings are listed at https://docs.python.org/library/codecs.html#standard-encodings. The FILENAME and ENCODING parts of the none output type will be ignored, else if the file already exists, it will be overwritten. You can specify this option more than once. Valid file output TYPEs are text, html, sql, csv, gml, dot, xml, sitemap, none or blacklist. Default is no file output. The various output types are documented below. Note that you can suppress all console output with the option :option:`-o` *none*."
msgid "Output to a file linkchecker-out.TYPE, $HOME/.linkchecker/failures for failures output, or FILENAME if specified. The ENCODING specifies the output encoding, the default is that of your locale. Valid encodings are listed at https://docs.python.org/library/codecs.html#standard-encodings. The FILENAME and ENCODING parts of the none output type will be ignored, else if the file already exists, it will be overwritten. You can specify this option more than once. Valid file output TYPEs are text, html, sql, csv, gml, dot, xml, sitemap, none or failures. Default is no file output. The various output types are documented below. Note that you can suppress all console output with the option :option:`-o` *none*."
msgstr ""
#: ../../src/man/linkchecker.rst:143
@ -174,7 +174,7 @@ msgid "Don't log warnings. Default is to log warnings."
msgstr ""
#: ../../src/man/linkchecker.rst:151
msgid "Specify output type as text, html, sql, csv, gml, dot, xml, sitemap, none or blacklist. Default type is text. The various output types are documented below. The ENCODING specifies the output encoding, the default is that of your locale. Valid encodings are listed at https://docs.python.org/library/codecs.html#standard-encodings."
msgid "Specify output type as text, html, sql, csv, gml, dot, xml, sitemap, none or failures. Default type is text. The various output types are documented below. The ENCODING specifies the output encoding, the default is that of your locale. Valid encodings are listed at https://docs.python.org/library/codecs.html#standard-encodings."
msgstr ""
#: ../../src/man/linkchecker.rst:161
@ -326,11 +326,11 @@ msgid "Log check result as SQL script with INSERT commands. An example script to
msgstr ""
#: ../../src/man/linkchecker.rst:282
msgid "**blacklist**"
msgid "**failures**"
msgstr ""
#: ../../src/man/linkchecker.rst:281
msgid "Suitable for cron jobs. Logs the check result into a file **~/.linkchecker/blacklist** which only contains entries with invalid URLs and the number of times they have failed."
msgid "Suitable for cron jobs. Logs the check result into a file **~/.linkchecker/failures** which only contains entries with invalid URLs and the number of times they have failed."
msgstr ""
#: ../../src/man/linkchecker.rst:285
@ -651,7 +651,7 @@ msgid "**~/.linkchecker/linkcheckerrc** - default configuration file"
msgstr ""
#: ../../src/man/linkchecker.rst:526
msgid "**~/.linkchecker/blacklist** - default blacklist logger output filename"
msgid "**~/.linkchecker/failures** - default failures logger output filename"
msgstr ""
#: ../../src/man/linkchecker.rst:528
@ -932,7 +932,7 @@ msgid "**fileoutput=**\\ *TYPE*\\ [**,**\\ *TYPE*...]"
msgstr ""
#: ../../src/man/linkcheckerrc.rst:167
msgid "Output to a file **linkchecker-out.**\\ *TYPE*, or **$HOME/.linkchecker/blacklist** for **blacklist** output. Valid file output types are **text**, **html**, **sql**, **csv**, **gml**, **dot**, **xml**, **none** or **blacklist**. Default is no file output. The various output types are documented below. Note that you can suppress all console output with **output=none**. Command line option: :option:`--file-output`"
msgid "Output to a file **linkchecker-out.**\\ *TYPE*, or **$HOME/.linkchecker/failures** for **failures** output. Valid file output types are **text**, **html**, **sql**, **csv**, **gml**, **dot**, **xml**, **none** or **failures**. Default is no file output. The various output types are documented below. Note that you can suppress all console output with **output=none**. Command line option: :option:`--file-output`"
msgstr ""
#: ../../src/man/linkcheckerrc.rst:180
@ -940,7 +940,7 @@ msgid "**log=**\\ *TYPE*\\ [**/**\\ *ENCODING*]"
msgstr ""
#: ../../src/man/linkcheckerrc.rst:175
msgid "Specify output type as **text**, **html**, **sql**, **csv**, **gml**, **dot**, **xml**, **none** or **blacklist**. Default type is **text**. The various output types are documented below. The *ENCODING* specifies the output encoding, the default is that of your locale. Valid encodings are listed at https://docs.python.org/library/codecs.html#standard-encodings. Command line option: :option:`--output`"
msgid "Specify output type as **text**, **html**, **sql**, **csv**, **gml**, **dot**, **xml**, **none** or **failures**. Default type is **text**. The various output types are documented below. The *ENCODING* specifies the output encoding, the default is that of your locale. Valid encodings are listed at https://docs.python.org/library/codecs.html#standard-encodings. Command line option: :option:`--output`"
msgstr ""
#: ../../src/man/linkcheckerrc.rst:184
@ -1260,7 +1260,7 @@ msgid "Set HTML valid color. Default is **#3ba557**."
msgstr ""
#: ../../src/man/linkcheckerrc.rst:316
msgid "blacklist"
msgid "failures"
msgstr ""
#: ../../src/man/linkcheckerrc.rst:324

View file

@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: LinkChecker \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-08-05 19:32+0100\n"
"POT-Creation-Date: 2020-08-22 16:37+0100\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"
@ -44,17 +44,21 @@ msgstr ""
msgid "Installation"
msgstr ""
#: ../../src/index.rst:25
#: ../../src/index.rst:24
msgid "See the :doc:`installation document <install>` for more information."
msgstr ""
#: ../../src/index.rst:27
msgid "Basic usage"
msgstr ""
#: ../../src/index.rst:26
#: ../../src/index.rst:28
msgid ""
"To check a URL like *http://www.example.org/myhomepage/* it is enough to "
"execute:"
msgstr ""
#: ../../src/index.rst:33
#: ../../src/index.rst:35
msgid ""
"This check will validate recursively all pages starting with "
"*http://www.example.org/myhomepage/*. Additionally, all external links "
@ -62,84 +66,84 @@ msgid ""
"into."
msgstr ""
#: ../../src/index.rst:39
#: ../../src/index.rst:41
msgid "Features"
msgstr ""
#: ../../src/index.rst:41
#: ../../src/index.rst:43
msgid "recursive and multithreaded checking and site crawling"
msgstr ""
#: ../../src/index.rst:42
#: ../../src/index.rst:44
msgid ""
"output in colored or normal text, HTML, SQL, CSV, XML or a sitemap graph "
"in different formats"
msgstr ""
#: ../../src/index.rst:44
#: ../../src/index.rst:46
msgid ""
"HTTP/1.1, HTTPS, FTP, mailto:, news:, nntp:, Telnet and local file links "
"support"
msgstr ""
#: ../../src/index.rst:46
#: ../../src/index.rst:48
msgid "restriction of link checking with regular expression filters for URLs"
msgstr ""
#: ../../src/index.rst:47
#: ../../src/index.rst:49
msgid "proxy support"
msgstr ""
#: ../../src/index.rst:48
#: ../../src/index.rst:50
msgid "username/password authorization for HTTP and FTP and Telnet"
msgstr ""
#: ../../src/index.rst:49
#: ../../src/index.rst:51
msgid "honors robots.txt exclusion protocol"
msgstr ""
#: ../../src/index.rst:50
#: ../../src/index.rst:52
msgid "Cookie support"
msgstr ""
#: ../../src/index.rst:51
#: ../../src/index.rst:53
msgid "HTML5 support"
msgstr ""
#: ../../src/index.rst:52
#: ../../src/index.rst:54
msgid ""
":ref:`Plugin support <man/linkchecker:PLUGINS>` allowing custom page "
"checks. Currently available are HTML and CSS syntax checks, Antivirus "
"checks, and more."
msgstr ""
#: ../../src/index.rst:54
#: ../../src/index.rst:56
msgid "Different interfaces: command line and web interface"
msgstr ""
#: ../../src/index.rst:55
#: ../../src/index.rst:57
msgid ""
"... and a lot more check options documented in the :doc:`man/linkchecker`"
" manual page."
msgstr ""
#: ../../src/index.rst:59
#: ../../src/index.rst:61
msgid "Screenshots"
msgstr ""
#: ../../src/index.rst:69
#: ../../src/index.rst:71
msgid "Commandline interface"
msgstr ""
#: ../../src/index.rst:70
#: ../../src/index.rst:72
msgid "WSGI web interface"
msgstr ""
#: ../../src/index.rst:73
#: ../../src/index.rst:75
msgid "Test suite status"
msgstr ""
#: ../../src/index.rst:74
#: ../../src/index.rst:76
msgid ""
"Linkchecker has extensive unit tests to ensure code quality. `Travis CI "
"<https://travis-ci.com/>`_ is used for continuous build and test "

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "LINKCHECKER" "1" "August 11, 2020" "" "LinkChecker"
.TH "LINKCHECKER" "1" "August 22, 2020" "" "LinkChecker"
.SH NAME
linkchecker \- Kommandozeilenprogramm zum Prüfen von HTML Dokumenten und Webseiten auf ungültige Verknüpfungen
.
@ -190,7 +190,7 @@ Gebe Testmeldungen aus für den angegebenen Logger. Verfügbare Logger sind cmdl
.INDENT 0.0
.TP
.B \-F TYPE[/ENCODING][/FILENAME], \-\-file\-output=TYPE[/ENCODING][/FILENAME]
Ausgabe in eine Datei namens linkchecker\-out.TYP, $HOME/.linkchecker/blacklist bei blacklist Ausgabe, oder DATEINAME falls angegeben. Das ENCODING gibt die Ausgabekodierung an. Der Standard ist das der lokalen Spracheinstellung. Gültige Enkodierungen sind aufgelistet unter \fI\%https://docs.python.org/library/codecs.html#standard\-encodings\fP\&. Der DATEINAME und ENKODIERUNG Teil wird beim Ausgabetyp none ignoriert, ansonsten wird die Datei überschrieben falls sie existiert. Sie können diese Option mehr als einmal verwenden. Gültige Ausgabetypen sind text, html, sql, csv, gml, dot, xml, sitemap, none oder blacklist. Standard ist keine Dateiausgabe. Die unterschiedlichen Ausgabetypen sind weiter unten dokumentiert. Beachten Sie, dass Sie mit der Option \fI\%\-o\fP \fInone\fP jegliche Ausgaben auf der Konsole verhindern können.
Ausgabe in eine Datei namens linkchecker\-out.TYP, $HOME/.linkchecker/failures bei failures Ausgabe, oder DATEINAME falls angegeben. Das ENCODING gibt die Ausgabekodierung an. Der Standard ist das der lokalen Spracheinstellung. Gültige Enkodierungen sind aufgelistet unter \fI\%https://docs.python.org/library/codecs.html#standard\-encodings\fP\&. Der DATEINAME und ENKODIERUNG Teil wird beim Ausgabetyp none ignoriert, ansonsten wird die Datei überschrieben falls sie existiert. Sie können diese Option mehr als einmal verwenden. Gültige Ausgabetypen sind text, html, sql, csv, gml, dot, xml, sitemap, none oder failures. Standard ist keine Dateiausgabe. Die unterschiedlichen Ausgabetypen sind weiter unten dokumentiert. Beachten Sie, dass Sie mit der Option \fI\%\-o\fP \fInone\fP jegliche Ausgaben auf der Konsole verhindern können.
.UNINDENT
.INDENT 0.0
.TP
@ -205,7 +205,7 @@ Gebe keine Warnungen aus. Standard ist die Ausgabe von Warnungen.
.INDENT 0.0
.TP
.B \-o TYPE[/ENCODING], \-\-output=TYPE[/ENCODING]
Gib Ausgabetyp als text, html, sql, csv, gml, dot, xml, sitemap, none oder blacklist an. Stadard Typ ist text. Die verschiedenen Ausgabetypen sind unten dokumentiert. Das ENCODING gibt die Ausgabekodierung an. Der Standard ist das der lokalen Spracheinstellung. Gültige Enkodierungen sind aufgelistet unter \fI\%https://docs.python.org/library/codecs.html#standard\-encodings\fP\&.
Gib Ausgabetyp als text, html, sql, csv, gml, dot, xml, sitemap, none oder failures an. Stadard Typ ist text. Die verschiedenen Ausgabetypen sind unten dokumentiert. Das ENCODING gibt die Ausgabekodierung an. Der Standard ist das der lokalen Spracheinstellung. Gültige Enkodierungen sind aufgelistet unter \fI\%https://docs.python.org/library/codecs.html#standard\-encodings\fP\&.
.UNINDENT
.INDENT 0.0
.TP
@ -315,8 +315,8 @@ Protokolliere Prüfergebnisse als XML Sitemap dessen Format unter \fI\%https://w
\fBsql\fP
Gebe Prüfresultat als SQL Skript mit INSERT Befehlen aus. Ein Beispielskript, um die initiale SQL Tabelle zu erstellen ist unter create.sql zu finden.
.TP
\fBblacklist\fP
Für Cronjobs geeignet. Gibt das Prüfergebnis in eine Datei \fB~/.linkchecker/blacklist\fP aus, welche nur Einträge mit fehlerhaften URLs und die Anzahl der Fehlversuche enthält.
\fBfailures\fP
Für Cronjobs geeignet. Gibt das Prüfergebnis in eine Datei \fB~/.linkchecker/failures\fP aus, welche nur Einträge mit fehlerhaften URLs und die Anzahl der Fehlversuche enthält.
.TP
\fBnone\fP
Gibt nichts aus. Für Debugging oder Prüfen des Rückgabewerts geeignet.
@ -550,7 +550,7 @@ LinkChecker benutzt Hauptspeicher für jede zu prüfende URL, die in der Wartesc
.sp
\fB~/.linkchecker/linkcheckerrc\fP \- Standardkonfigurationsdatei
.sp
\fB~/.linkchecker/blacklist\fP \- Standard Dateiname der blacklist Logger Ausgabe
\fB~/.linkchecker/failures\fP \- Standard Dateiname der failures Logger Ausgabe
.sp
\fBlinkchecker\-out.\fP\fITYP\fP \- Standard Dateiname der Logausgabe
.SH SIEHE AUCH

View file

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "LINKCHECKERRC" "5" "August 11, 2020" "" "LinkChecker"
.TH "LINKCHECKERRC" "5" "August 22, 2020" "" "LinkChecker"
.SH NAME
linkcheckerrc \- Konfigurationsdatei für LinkChecker
.
@ -168,10 +168,10 @@ form.
Gebe Testmeldungen aus für den angegebenen Logger. Verfügbare Logger sind \fBcmdline\fP, \fBchecking\fP, \fBcache\fP, \fBdns\fP, \fBthread\fP, \fBplugins\fP und \fBall\fP\&. Die Angabe \fBall\fP ist ein Synonym für alle verfügbaren Logger. Kommandozeilenoption: \fB\-\-debug\fP
.TP
\fBfileoutput=\fP\fITYPE\fP[\fB,\fP\fITYPE\fP\&...]
Ausgabe in Datei \fBlinkchecker\-out.\fP\fITYP\fP, \fB$HOME/.linkchecker/blacklist\fP für \fBblacklist\fP Ausgabe. Gültige Ausgabearten sind \fBtext\fP, \fBhtml\fP, \fBsql\fP, \fBcsv\fP, \fBgml\fP, \fBdot\fP, \fBxml\fP, \fBnone\fP> oder \fBblacklist\fP Standard ist keine Dateiausgabe. Die verschiedenen Ausgabearten sind unten dokumentiert. Bemerke, dass man alle Konsolenausgaben mit \fBoutput=none\fP unterdrücken kann. Kommandozeilenoption: \fB\-\-file\-output\fP
Ausgabe in Datei \fBlinkchecker\-out.\fP\fITYP\fP, \fB$HOME/.linkchecker/failures\fP für \fBfailures\fP Ausgabe. Gültige Ausgabearten sind \fBtext\fP, \fBhtml\fP, \fBsql\fP, \fBcsv\fP, \fBgml\fP, \fBdot\fP, \fBxml\fP, \fBnone\fP> oder \fBfailures\fP Standard ist keine Dateiausgabe. Die verschiedenen Ausgabearten sind unten dokumentiert. Bemerke, dass man alle Konsolenausgaben mit \fBoutput=none\fP unterdrücken kann. Kommandozeilenoption: \fB\-\-file\-output\fP
.TP
\fBlog=\fP\fITYPE\fP[\fB/\fP\fIENCODING\fP]
Gib Ausgabetyp als \fBtext\fP, \fBhtml\fP, \fBsql\fP, \fBcsv\fP, \fBgml\fP, \fBdot\fP, \fBxml\fP, \fBnone\fP oder \fBblacklist\fP an. Stadard Typ ist \fBtext\fP\&. Die verschiedenen Ausgabetypen sind unten dokumentiert. Das \fIENCODING\fP gibt die Ausgabekodierung an. Der Standard ist das der lokalen Spracheinstellung. Gültige Enkodierungen sind aufgelistet unter \fI\%https://docs.python.org/library/codecs.html#standard\-encodings\fP\&. Kommandozeilenoption: \fB\-\-output\fP
Gib Ausgabetyp als \fBtext\fP, \fBhtml\fP, \fBsql\fP, \fBcsv\fP, \fBgml\fP, \fBdot\fP, \fBxml\fP, \fBnone\fP oder \fBfailures\fP an. Stadard Typ ist \fBtext\fP\&. Die verschiedenen Ausgabetypen sind unten dokumentiert. Das \fIENCODING\fP gibt die Ausgabekodierung an. Der Standard ist das der lokalen Spracheinstellung. Gültige Enkodierungen sind aufgelistet unter \fI\%https://docs.python.org/library/codecs.html#standard\-encodings\fP\&. Kommandozeilenoption: \fB\-\-output\fP
.TP
\fBquiet=\fP[\fB0\fP|\fB1\fP]
Falls gesetzt, erfolgt keine Ausgabe. Ein Alias für \fBlog=none\fP\&. Dies ist nur in Verbindung mit \fBfileoutput\fP nützlich. Kommandozeilenoption: \fB\-\-verbose\fP
@ -326,7 +326,7 @@ Setze HTML Fehlerfarbe. Standard ist \fB#db4930\fP\&.
\fBcolorok=\fP
Setze HTML Gültigkeitsfarbe. Standard ist \fB#3ba557\fP\&.
.UNINDENT
.SS blacklist
.SS failures
.INDENT 0.0
.TP
\fBfilename=\fP\fISTRING\fP

View file

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "LINKCHECKER" "1" "August 11, 2020" "" "LinkChecker"
.TH "LINKCHECKER" "1" "August 22, 2020" "" "LinkChecker"
.SH NAME
linkchecker \- command line client to check HTML documents and websites for broken links
.
@ -203,7 +203,7 @@ during debug runs.
.TP
.B \-F TYPE[/ENCODING][/FILENAME], \-\-file\-output=TYPE[/ENCODING][/FILENAME]
Output to a file linkchecker\-out.TYPE,
$HOME/.linkchecker/blacklist for blacklist output, or
$HOME/.linkchecker/failures for failures output, or
FILENAME if specified. The ENCODING specifies the output
encoding, the default is that of your locale. Valid encodings are
listed at
@ -212,7 +212,7 @@ The FILENAME and ENCODING parts of the none output type will
be ignored, else if the file already exists, it will be overwritten.
You can specify this option more than once. Valid file output TYPEs
are text, html, sql, csv, gml, dot, xml,
sitemap, none or blacklist. Default is no file output.
sitemap, none or failures. Default is no file output.
The various output types are documented below. Note that you can
suppress all console output with the option \fI\%\-o\fP \fInone\fP\&.
.UNINDENT
@ -230,7 +230,7 @@ Don\(aqt log warnings. Default is to log warnings.
.TP
.B \-o TYPE[/ENCODING], \-\-output=TYPE[/ENCODING]
Specify output type as text, html, sql, csv,
gml, dot, xml, sitemap, none or blacklist.
gml, dot, xml, sitemap, none or failures.
Default type is text. The various output types are documented
below.
The ENCODING specifies the output encoding, the default is that of
@ -377,9 +377,9 @@ Log check result as an XML sitemap whose protocol is documented at
Log check result as SQL script with INSERT commands. An example
script to create the initial SQL table is included as create.sql.
.TP
\fBblacklist\fP
\fBfailures\fP
Suitable for cron jobs. Logs the check result into a file
\fB~/.linkchecker/blacklist\fP which only contains entries with
\fB~/.linkchecker/failures\fP which only contains entries with
invalid URLs and the number of times they have failed.
.TP
\fBnone\fP
@ -665,7 +665,7 @@ This might slow down the program or even the whole system.
.sp
\fB~/.linkchecker/linkcheckerrc\fP \- default configuration file
.sp
\fB~/.linkchecker/blacklist\fP \- default blacklist logger output filename
\fB~/.linkchecker/failures\fP \- default failures logger output filename
.sp
\fBlinkchecker\-out.\fP\fITYPE\fP \- default logger file output name
.SH SEE ALSO

View file

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "LINKCHECKERRC" "5" "August 11, 2020" "" "LinkChecker"
.TH "LINKCHECKERRC" "5" "August 22, 2020" "" "LinkChecker"
.SH NAME
linkcheckerrc \- configuration file for LinkChecker
.
@ -213,16 +213,16 @@ Command line option: \fB\-\-debug\fP
.TP
\fBfileoutput=\fP\fITYPE\fP[\fB,\fP\fITYPE\fP\&...]
Output to a file \fBlinkchecker\-out.\fP\fITYPE\fP, or
\fB$HOME/.linkchecker/blacklist\fP for \fBblacklist\fP output.
\fB$HOME/.linkchecker/failures\fP for \fBfailures\fP output.
Valid file output types are \fBtext\fP, \fBhtml\fP, \fBsql\fP, \fBcsv\fP,
\fBgml\fP, \fBdot\fP, \fBxml\fP, \fBnone\fP or \fBblacklist\fP\&. Default is no
\fBgml\fP, \fBdot\fP, \fBxml\fP, \fBnone\fP or \fBfailures\fP\&. Default is no
file output. The various output types are documented below. Note
that you can suppress all console output with \fBoutput=none\fP\&.
Command line option: \fB\-\-file\-output\fP
.TP
\fBlog=\fP\fITYPE\fP[\fB/\fP\fIENCODING\fP]
Specify output type as \fBtext\fP, \fBhtml\fP, \fBsql\fP, \fBcsv\fP,
\fBgml\fP, \fBdot\fP, \fBxml\fP, \fBnone\fP or \fBblacklist\fP\&. Default type
\fBgml\fP, \fBdot\fP, \fBxml\fP, \fBnone\fP or \fBfailures\fP\&. Default type
is \fBtext\fP\&. The various output types are documented below.
The \fIENCODING\fP specifies the output encoding, the default is that of
your locale. Valid encodings are listed at
@ -400,7 +400,7 @@ Set HTML error color. Default is \fB#db4930\fP\&.
\fBcolorok=\fP
Set HTML valid color. Default is \fB#3ba557\fP\&.
.UNINDENT
.SS blacklist
.SS failures
.INDENT 0.0
.TP
\fBfilename=\fP\fISTRING\fP

View file

@ -81,5 +81,5 @@ graphviz_output_format = 'svg'
# -- Mock --------------------------------------------------------------------
import linkcheck.logger
linkcheck.logger.blacklist.BlacklistLogger.LoggerArgs = {
'filename': '~/.linkchecker/blacklist'}
linkcheck.logger.failures.FailuresLogger.LoggerArgs = {
'filename': '~/.linkchecker/failures'}

View file

@ -125,7 +125,7 @@ Output options
.. option:: -F TYPE[/ENCODING][/FILENAME], --file-output=TYPE[/ENCODING][/FILENAME]
Output to a file linkchecker-out.TYPE,
$HOME/.linkchecker/blacklist for blacklist output, or
$HOME/.linkchecker/failures for failures output, or
FILENAME if specified. The ENCODING specifies the output
encoding, the default is that of your locale. Valid encodings are
listed at
@ -134,7 +134,7 @@ Output options
be ignored, else if the file already exists, it will be overwritten.
You can specify this option more than once. Valid file output TYPEs
are text, html, sql, csv, gml, dot, xml,
sitemap, none or blacklist. Default is no file output.
sitemap, none or failures. Default is no file output.
The various output types are documented below. Note that you can
suppress all console output with the option :option:`-o` *none*.
@ -149,7 +149,7 @@ Output options
.. option:: -o TYPE[/ENCODING], --output=TYPE[/ENCODING]
Specify output type as text, html, sql, csv,
gml, dot, xml, sitemap, none or blacklist.
gml, dot, xml, sitemap, none or failures.
Default type is text. The various output types are documented
below.
The ENCODING specifies the output encoding, the default is that of
@ -277,9 +277,9 @@ outputting a sitemap graph format.
**sql**
Log check result as SQL script with INSERT commands. An example
script to create the initial SQL table is included as create.sql.
**blacklist**
**failures**
Suitable for cron jobs. Logs the check result into a file
**~/.linkchecker/blacklist** which only contains entries with
**~/.linkchecker/failures** which only contains entries with
invalid URLs and the number of times they have failed.
**none**
Logs nothing. Suitable for debugging or checking the exit code.
@ -523,7 +523,7 @@ FILES
**~/.linkchecker/linkcheckerrc** - default configuration file
**~/.linkchecker/blacklist** - default blacklist logger output filename
**~/.linkchecker/failures** - default failures logger output filename
**linkchecker-out.**\ *TYPE* - default logger file output name

View file

@ -165,15 +165,15 @@ output
Command line option: :option:`--debug`
**fileoutput=**\ *TYPE*\ [**,**\ *TYPE*...]
Output to a file **linkchecker-out.**\ *TYPE*, or
**$HOME/.linkchecker/blacklist** for **blacklist** output.
**$HOME/.linkchecker/failures** for **failures** output.
Valid file output types are **text**, **html**, **sql**, **csv**,
**gml**, **dot**, **xml**, **none** or **blacklist**. Default is no
**gml**, **dot**, **xml**, **none** or **failures**. Default is no
file output. The various output types are documented below. Note
that you can suppress all console output with **output=none**.
Command line option: :option:`--file-output`
**log=**\ *TYPE*\ [**/**\ *ENCODING*]
Specify output type as **text**, **html**, **sql**, **csv**,
**gml**, **dot**, **xml**, **none** or **blacklist**. Default type
**gml**, **dot**, **xml**, **none** or **failures**. Default type
is **text**. The various output types are documented below.
The *ENCODING* specifies the output encoding, the default is that of
your locale. Valid encodings are listed at
@ -312,7 +312,7 @@ html
**colorok=**
Set HTML valid color. Default is **#3ba557**.
blacklist
failures
^^^^^^^^^
**filename=**\ *STRING*

View file

@ -10,6 +10,9 @@ for building.
The loginuserfield and loginpasswordfield entries in the authentication section
of linkcheckerrc are now matched to a login form case-sensitively.
The "blacklist" logger has been renamed to "failures". "blacklist" is
recognised as an alias for "failures" but will be removed in future.
Migrating from 8.x to 9.0
-------------------------
The Python requests package is now required.

View file

@ -108,6 +108,14 @@ class LCConfigParser(RawConfigParser):
section = "output"
from ..logger import LoggerClasses
if self.has_section("blacklist"):
log.warn(
LOG_CHECK,
_("The blacklist section in linkcheckerrc is deprecated, "
"please rename to failures")
)
for opt in self.options("blacklist"):
self.config["failures"][opt] = self.get("blacklist", opt)
for c in LoggerClasses:
key = c.LoggerName
if self.has_section(key):
@ -138,13 +146,13 @@ class LCConfigParser(RawConfigParser):
loggers = self.get(section, "fileoutput").split(",")
# strip names from whitespace
loggers = (x.strip().lower() for x in loggers)
# no file output for the blacklist and none Logger
# no file output for the failures and none Logger
from ..logger import LoggerNames
loggers = (
x
for x in loggers
if x in LoggerNames and x not in ("blacklist", "none")
if x in LoggerNames and x not in ("failures", "none")
)
for val in loggers:
output = self.config.logger_new(val, fileoutput=1)

View file

@ -14,7 +14,7 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
A blacklist logger.
A failures logger.
"""
import os
@ -24,27 +24,35 @@ from . import _Logger
from .. import log, LOG_CHECK
class BlacklistLogger(_Logger):
class FailuresLogger(_Logger):
"""
Updates a blacklist of wrong links. If a link on the blacklist
is working (again), it is removed from the list. So after n days
we have only links on the list which failed for n days.
Updates a list of failed links. If a link already on the list
is found to be working, it is removed. After n days
we only have links on the list which failed within those n days.
"""
LoggerName = "blacklist"
LoggerName = "failures"
LoggerArgs = {
"filename": os.path.join(get_user_data(), "blacklist"),
"filename": os.path.join(get_user_data(), "failures"),
}
def __init__(self, **kwargs):
"""Intialize with old blacklist data (if found, else not)."""
"""Intialize with old failures data (if found)."""
blacklist = os.path.join(get_user_data(), "blacklist")
if os.path.isfile(blacklist):
self.LoggerArgs["filename"] = blacklist
log.warn(
LOG_CHECK,
_("%(blacklist)s file is deprecated please rename to failures")
% {"blacklist": blacklist}
)
args = self.get_args(kwargs)
super().__init__(**args)
self.init_fileoutput(args)
self.blacklist = {}
self.failures = {}
if self.filename is not None and os.path.exists(self.filename):
self.read_blacklist()
self.read_failures()
def comment(self, s, **args):
"""
@ -54,28 +62,28 @@ class BlacklistLogger(_Logger):
def log_url(self, url_data):
"""
Put invalid url in blacklist, delete valid url from blacklist.
Add invalid url to failures, delete valid url from failures.
"""
key = (url_data.parent_url, url_data.cache_url)
key = repr(key)
if key in self.blacklist:
if key in self.failures:
if url_data.valid:
del self.blacklist[key]
del self.failures[key]
else:
self.blacklist[key] += 1
self.failures[key] += 1
else:
if not url_data.valid:
self.blacklist[key] = 1
self.failures[key] = 1
def end_output(self, **kwargs):
"""
Write blacklist file.
Write failures file.
"""
self.write_blacklist()
self.write_failures()
def read_blacklist(self):
def read_failures(self):
"""
Read a previously stored blacklist from file fd.
Read a previously stored failures from file fd.
"""
with open(self.filename, 'r', encoding=self.output_encoding,
errors=self.codec_errors) as fd:
@ -88,18 +96,18 @@ class BlacklistLogger(_Logger):
if not key.startswith('('):
log.critical(
LOG_CHECK,
_("invalid line starting with '%(linestart)s' in %(blacklist)s")
% {"linestart": line[:12], "blacklist": self.filename}
_("invalid line starting with '%(linestart)s' in %(failures)s")
% {"linestart": line[:12], "failures": self.filename}
)
raise SystemExit(2)
self.blacklist[key] = int(value)
self.failures[key] = int(value)
def write_blacklist(self):
def write_failures(self):
"""
Write the blacklist.
Write the failures file.
"""
oldmask = os.umask(0o077)
for key, value in self.blacklist.items():
for key, value in self.failures.items():
self.write("%d %s%s" % (value, repr(key), os.linesep))
self.close_fileoutput()
# restore umask

View file

@ -200,9 +200,9 @@ gxml Log check result as a GraphXML sitemap graph.
xml Log check result as machine-readable XML.
sql Log check result as SQL script with INSERT commands. An example
script to create the initial SQL table is included as create.sql.
blacklist
failures
Suitable for cron jobs. Logs the check result into a file
~/.linkchecker/blacklist which only contains entries with invalid
~/.linkchecker/failures which only contains entries with invalid
URLs and the number of times they have failed.
none Logs nothing. Suitable for debugging or checking the exit code.
"""
@ -319,8 +319,8 @@ group.add_argument(
dest="fileoutput",
metavar="TYPE[/ENCODING[/FILENAME]]",
help=_(
"Output to a file linkchecker-out.TYPE, $HOME/.linkchecker/blacklist for\n"
"'blacklist' output, or FILENAME if specified.\n"
"Output to a file linkchecker-out.TYPE, $HOME/.linkchecker/failures for\n"
"'failures' output, or FILENAME if specified.\n"
"The ENCODING specifies the output encoding, the default is that of your\n"
"locale.\n"
"Valid encodings are listed at "
@ -579,6 +579,13 @@ if options.output:
else:
logtype, encoding = options.output, i18n.default_encoding
logtype = logtype.lower()
if logtype == "blacklist":
log.warn(
LOG_CMDLINE,
_("blacklist is deprecated for option %(option)s, "
"using failures instead") % {"option": "'-o, --output'"}
)
logtype = "failures"
if logtype not in linkcheck.logger.LoggerNames:
print_usage(
_("Unknown logger type %(type)r in %(output)r for option %(option)s")
@ -616,6 +623,13 @@ if options.fileoutput:
ns["filename"] = suffix
else:
ns["filename"] = suffix
if ftype == "blacklist":
log.warn(
LOG_CMDLINE,
_("blacklist logger is deprecated for option %(option)s, "
"using failures instead") % {"option": "'-F, --file-output'"}
)
ftype = "failures"
if ftype not in linkcheck.logger.LoggerNames:
print_usage(
_("Unknown logger type %(type)r in %(output)r for option %(option)s")

View file

@ -335,7 +335,7 @@ if os.name == "posix":
"share/linkchecker/examples",
[
"config/linkchecker-completion",
"doc/examples/check_blacklist.sh",
"doc/examples/check_failures.sh",
"doc/examples/check_for_x_errors.sh",
"doc/examples/check_urls.sh",
],

View file

@ -169,7 +169,7 @@ def add_fileoutput_config(config):
else:
return
for ftype in linkcheck.logger.LoggerNames:
if ftype in ("test", "blacklist"):
if ftype in ("test", "failures"):
continue
logger = config.logger_new(ftype, fileoutput=1, filename=devnull)
config["fileoutput"].append(logger)

View file

@ -103,8 +103,8 @@ colorwarning=#ff0000
colorerror=#ff0000
colorok=#ff0000
[blacklist]
filename=blacklist
[failures]
filename=failures
encoding=utf-8
[xml]

View file

@ -0,0 +1,4 @@
# config with deprecated test values
[blacklist]
filename=blacklist
encoding=utf-8

View file

@ -145,9 +145,9 @@ class TestConfig(unittest.TestCase):
self.assertEqual(config["html"]["colorwarning"], "#ff0000")
self.assertEqual(config["html"]["colorerror"], "#ff0000")
self.assertEqual(config["html"]["colorok"], "#ff0000")
# blacklist logger section
self.assertEqual(config["blacklist"]["filename"], "blacklist")
self.assertEqual(config["blacklist"]["encoding"], "utf-8")
# failures logger section
self.assertEqual(config["failures"]["filename"], "failures")
self.assertEqual(config["failures"]["encoding"], "utf-8")
# xml logger section
self.assertEqual(config["xml"]["filename"], "imadoofus.xml")
self.assertEqual(config["xml"]["parts"], ["realurl"])
@ -166,3 +166,12 @@ class TestConfig(unittest.TestCase):
config = linkcheck.configuration.Configuration()
files = [get_file("config2.ini")]
self.assertRaises(linkcheck.LinkCheckerError, config.read, files)
def test_confparse_deprecated(self):
config = linkcheck.configuration.Configuration()
files = [get_file("config3.ini")]
config.read(files)
config.sanitize()
# blacklist logger section
self.assertEqual(config["failures"]["filename"], "blacklist")
self.assertEqual(config["failures"]["encoding"], "utf-8")