Remove local HTML and CSS syntax check.

This commit is contained in:
Bastian Kleineidam 2013-02-08 21:36:02 +01:00
parent 35e68686fb
commit 64d95e45e0
20 changed files with 1547 additions and 1540 deletions

View file

@ -141,8 +141,7 @@
# warn if size info exceeds given maximum of bytes
#warnsizebytes=2000
#nntpserver=
# check HTML or CSS syntax locally with HTML tidy or cssutils, falling
# back to the W3C online validator
# check HTML or CSS syntax with the W3C online validator
#checkhtml=1
#checkcss=1
# scan URL content for viruses with ClamAV

View file

@ -1,3 +1,9 @@
8.5 "" (released xx.xx.2013)
Changes:
- checking: Always use the W3C validator to check HTML or CSS syntax.
8.4 "Frankenweenie" (released 25.01.2013)
Features:

908
doc/de.po

File diff suppressed because it is too large Load diff

View file

@ -92,12 +92,10 @@ Gebe die Version aus und beende das Programm.
.SS Ausgabeoptionen
.TP
\fB\-\-check\-css\fP
Prüfe Syntax von CSS URLs mit cssutils. Wenn es nicht installiert ist, prüfe
mit dem W3C Online Validator.
Check syntax of CSS URLs with the W3C online validator.
.TP
\fB\-\-check\-html\fP
Prüfe Syntax von HTML URLs mit HTML tidy. Wenn es nicht installiert ist,
prüfe mit dem W3C Online Validator.
Check syntax of HTML URLs with the W3C online validator.
.TP
\fB\-\-complete\fP
Gebe alle geprüften URLs aus. Standard ist es, doppelte URLs nur einmal

View file

@ -24,14 +24,12 @@ Option aktiviert die Ausgabe der Warnung \fBurl\-anchor\-not\-found\fP.
Kommandozeilenoption: \fB\-\-anchors\fP
.TP
\fBcheckcss=\fP[\fB0\fP|\fB1\fP]
Prüfe Syntax von CSS URLs mit cssutils. Wenn cssutils nicht installiert ist,
prüfe mit dem W3C Online Validator.
Check syntax of CSS URLs with the W3C online validator.
.br
Kommandozeilenoption: \fB\-\-check\-css\fP
.TP
\fBcheckhtml=\fP[\fB0\fP|\fB1\fP]
Prüfe Syntax von HTML URLs mit HTML tidy. Wenn HTML tidy nicht installiert
ist, prüfe mit dem W3C Online Validator.
Check syntax of HTML URLs with the W3C online validator.
.br
Kommandozeilenoption: \fB\-\-check\-html\fP
.TP

View file

@ -32,10 +32,6 @@ installation is recommended.
Visual C++ 2008 runtime from
http://www.microsoft.com/downloads/details.aspx?FamilyID=9b2da534-3e03-4391-8a4d-074b9f2bc1bf&displaylang=en
- *Optional, for HTML/CSS syntax checks:*
HTML tidy from http://utidylib.berlios.de/
cssutils from http://cthedot.de/cssutils/
- *Optional, used for Virus checking:*
ClamAv for Unix from http://www.clamav.net/lang/en/download/
or for Windows from http://www.sosdg.org/clamav-win32/

View file

@ -81,12 +81,10 @@ Print version and exit.
.SS Output options
.TP
\fB\-\-check\-css\fP
Check syntax of CSS URLs with cssutils. If it's not installed,
check with the W3C online validator.
Check syntax of CSS URLs with the W3C online validator.
.TP
\fB\-\-check\-html\fP
Check syntax of HTML URLs with HTML tidy. If it's not installed,
check with the W3C online validator.
Check syntax of HTML URLs with the W3C online validator.
.TP
\fB\-\-complete\fP
Log all URLs, including duplicates. Default is to log duplicate URLs only once.

View file

@ -19,14 +19,12 @@ This option enables logging of the warning \fBurl\-anchor\-not\-found\fP.
Command line option: \fB\-\-anchors\fP
.TP
\fBcheckcss=\fP[\fB0\fP|\fB1\fP]
Check syntax of CSS URLs with the cssutils library, falling back to the
W3C online validator if cssutils is not available.
Check syntax of CSS URLs with the W3C online validator.
.br
Command line option: \fB\-\-check\-css\fP
.TP
\fBcheckhtml=\fP[\fB0\fP|\fB1\fP]
Check syntax of HTML URLs with the HTML tidy library, falling back to the
W3C online validator if HTML tidy is not available..
Check syntax of HTML URLs with the W3C online validator.
.br
Command line option: \fB\-\-check\-html\fP
.TP

View file

@ -53,10 +53,6 @@ First, install the required software.
4. *Optional, for bash-completion:*
optcomplete Python module from http://furius.ca/optcomplete/
5. *Optional, for HTML/CSS syntax checks:*
HTML tidy from http://utidylib.berlios.de/
cssutils from http://cthedot.de/cssutils/
6. *Optional, for displaying country codes:*
GeoIP from http://www.maxmind.com/app/python

File diff suppressed because it is too large Load diff

View file

@ -5,10 +5,8 @@ Date: 08.08.2012
OK Python
OK Qt/PyQt
OK cssutils from http://cthedot.de/cssutils/
OK mod_wsgi from http://code.google.com/p/modwsgi/
TODO optcomplete from http://furius.ca/optcomplete/
TODO HTML tidy from http://utidylib.berlios.de/
TODO GeoIP from http://www.maxmind.com/app/python
TODO Twill from http://twill.idyll.org/
TODO Python Gtk from http://www.pygtk.org/downloads.html

View file

@ -20,7 +20,6 @@ Main functions for link checking.
import os
import cgi
import logging
import urllib
from .. import strformat, url as urlutil, log, LOG_CHECK
@ -167,24 +166,6 @@ def get_index_html (urls):
return os.linesep.join(lines)
class StoringHandler (logging.Handler):
"""Store all emitted log messages in a size-limited list.
Used by the CSS syntax checker."""
def __init__ (self, maxrecords=100):
"""Initialize site-limited list."""
logging.Handler.__init__(self)
self.storage = []
self.maxrecords = maxrecords
def emit (self, record):
"""Save message record. If storage site is exceeded, remove
oldest message record."""
if len(self.storage) >= self.maxrecords:
self.storage.pop()
self.storage.append(record)
# all the URL classes
from . import (fileurl, unknownurl, ftpurl, httpurl, dnsurl,
httpsurl, mailtourl, telneturl, nntpurl, ignoreurl)

View file

@ -108,6 +108,8 @@ WARN_MAIL_UNVERIFIED_ADDRESS = "mail-unverified-address"
WARN_MAIL_NO_CONNECTION = "mail-no-connection"
WARN_NNTP_NO_SERVER = "nntp-no-server"
WARN_NNTP_NO_NEWSGROUP = "nntp-no-newsgroup"
WARN_SYNTAX_HTML = "syntax-html"
WARN_SYNTAX_CSS = "syntax-css"
# registered warnings
Warnings = {
@ -153,4 +155,6 @@ Warnings = {
WARN_NNTP_NO_SERVER: _("No NNTP server was found."),
WARN_NNTP_NO_NEWSGROUP: _("The NNTP newsgroup could not be found."),
WARN_URL_OBFUSCATED_IP: _("The IP is obfuscated."),
WARN_SYNTAX_HTML: _("HTML syntax error."),
WARN_SYNTAX_CSS: _("CSS syntax error."),
}

View file

@ -19,7 +19,6 @@ Base URL handler.
"""
import sys
import os
import logging
import urlparse
import urllib2
import urllib
@ -28,7 +27,7 @@ import errno
import socket
import select
from . import absolute_url, StoringHandler, get_url_from
from . import absolute_url, get_url_from
from .. import (log, LOG_CHECK, LOG_CACHE, httputil, httplib2 as httplib,
strformat, LinkCheckerError, url as urlutil, trace, clamav, winutil, geoip,
fileutil, get_link_pat)
@ -41,7 +40,8 @@ from .const import (WARN_URL_EFFECTIVE_URL,
WARN_URL_CONTENT_SIZE_TOO_LARGE, WARN_URL_CONTENT_SIZE_ZERO,
WARN_URL_CONTENT_SIZE_UNEQUAL, WARN_URL_WHITESPACE,
WARN_URL_TOO_LONG, URL_MAX_LENGTH, URL_WARN_LENGTH,
WARN_URL_CONTENT_DUPLICATE,
WARN_URL_CONTENT_DUPLICATE, WARN_SYNTAX_HTML,
WARN_SYNTAX_CSS,
ExcList, ExcSyntaxList, ExcNoCacheList)
# helper alias
@ -852,58 +852,6 @@ class UrlBase (object):
"size": self.size},
tag=WARN_URL_CONTENT_SIZE_UNEQUAL)
def check_html (self):
"""Check HTML syntax of this page (which is supposed to be HTML)
with the local HTML tidy module."""
if not fileutil.has_module("tidy"):
return self.check_html_w3()
import tidy
options = dict(output_html=0, show_warnings=1, quiet=True,
input_encoding='utf8', output_encoding='utf8', tidy_mark=0)
try:
doc = tidy.parseString(self.get_content(), **options)
errors = filter_tidy_errors(doc.errors)
if errors:
for err in errors:
self.add_warning(u"HTMLTidy: %s" % err)
else:
self.add_info(u"HTMLTidy: %s" % _("valid HTML syntax"))
except Exception:
# catch _all_ exceptions since we dont want third party module
# errors to propagate into this library
err = str(sys.exc_info()[1])
log.warn(LOG_CHECK,
_("tidy HTML parsing caused error: %(msg)s ") %
{"msg": err})
def check_css (self):
"""Check CSS syntax of this page (which is supposed to be CSS)
with the local cssutils module."""
if not fileutil.has_module("cssutils"):
return self.check_css_w3()
import cssutils
try:
csslog = logging.getLogger('cssutils')
csslog.propagate = 0
del csslog.handlers[:]
handler = StoringHandler()
csslog.addHandler(handler)
csslog.setLevel(logging.WARN)
cssparser = cssutils.CSSParser(log=csslog)
cssparser.parseString(self.get_content(), href=self.url)
if handler.storage:
for record in handler.storage:
self.add_warning(u"cssutils: %s" % record.getMessage())
else:
self.add_info(u"cssutils: %s" % _("valid CSS syntax"))
except Exception:
# catch _all_ exceptions since we dont want third party module
# errors to propagate into this library
err = str(sys.exc_info()[1])
log.warn(LOG_CHECK,
_("cssutils parsing caused error: %(msg)s") %
{"msg": err})
def check_w3_errors (self, xml, w3type):
"""Add warnings for W3C HTML or CSS errors in xml format.
w3type is either "W3C HTML" or "W3C CSS"."""
@ -917,26 +865,24 @@ class UrlBase (object):
"column": getXmlText(error, "m:col"),
"msg": getXmlText(error, "m:message"),
}
self.add_warning(warnmsg % attrs)
tag = WARN_SYNTAX_HTML if w3type == "W3C HTML" else WARN_SYNTAX_CSS
self.add_warning(warnmsg % attrs, tag=tag)
def check_html_w3 (self):
def check_html (self):
"""Check HTML syntax of this page (which is supposed to be HTML)
with the online W3C HTML validator documented at
http://validator.w3.org/docs/api.html
"""
self.aggregate.check_w3_time()
try:
u = urllib2.urlopen('http://validator.w3.org/check',
urllib.urlencode({
'fragment': self.get_content(),
'output': 'soap12',
}))
body = {'fragment': self.get_content(), 'output': 'soap12'}
data = urllib.urlencode(body)
u = urllib2.urlopen('http://validator.w3.org/check', data)
if u.headers.get('x-w3c-validator-status', 'Invalid') == 'Valid':
self.add_info(u"W3C Validator: %s" % _("valid HTML syntax"))
return
self.check_w3_errors(u.read(), "W3C HTML")
except Exception:
raise
# catch _all_ exceptions since we dont want third party module
# errors to propagate into this library
err = str(sys.exc_info()[1])
@ -944,7 +890,7 @@ class UrlBase (object):
_("HTML W3C validation caused error: %(msg)s ") %
{"msg": err})
def check_css_w3 (self):
def check_css (self):
"""Check CSS syntax of this page (which is supposed to be CSS)
with the online W3C CSS validator documented at
http://jigsaw.w3.org/css-validator/manual.html#expert
@ -1268,12 +1214,6 @@ class UrlBase (object):
return CompactUrlData(self.to_wire_dict())
def filter_tidy_errors (errors):
"""Filter certain errors from HTML tidy run."""
return [x for x in errors if not \
(x.severity=='W' and x.message=='<table> lacks "summary" attribute')]
urlDataAttr = [
'valid',
'extern',

View file

@ -64,8 +64,6 @@ def normpath (path):
Modules = (
("PyQt4.Qsci", u"QScintilla"),
("optcomplete", u"Optcomplete"),
("tidy", u"HTMLtidy"),
("cssutils", u"CSSutils"),
("GeoIP", u"GeoIP"), # on Unix systems
("pygeoip", u"GeoIP"), # on Windows systems
("twill", u"Twill"),

View file

@ -1,5 +1,5 @@
# -*- coding: iso-8859-1 -*-
# Copyright (C) 2005-2012 Bastian Kleineidam
# Copyright (C) 2005-2013 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
@ -60,17 +60,20 @@ def write_file (filename, content, backup=False, callback=None):
os.remove(filename+".bak")
def has_module (name):
def has_module (name, without_error=True):
"""Test if given module can be imported.
@param without_error: True if module must not throw any errors when importing
@return: flag if import is successful
@rtype: bool
"""
try:
importlib.import_module(name)
return True
except (OSError, ImportError):
# some modules (for example HTMLtidy) raise OSError
except ImportError:
return False
except Exception:
# some modules raise errors when intitializing
return not without_error
class GlobDirectoryWalker (object):

View file

@ -1,6 +1,6 @@
#!/usr/bin/python -u
# -*- coding: iso-8859-1 -*-
# Copyright (C) 2000-2012 Bastian Kleineidam
# Copyright (C) 2000-2013 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
@ -279,12 +279,10 @@ optparser.add_option_group(group)
group = optparse.OptionGroup(optparser, _("Output options"))
group.add_option("--check-css", action="store_true", dest="checkcss",
help=_(
"""Check syntax of CSS URLs with cssutils. If it's not installed,
check with the W3C online validator."""))
"""Check syntax of CSS URLs with the W3C online validator."""))
group.add_option("--check-html", action="store_true", dest="checkhtml",
help=_(
"""Check syntax of HTML URLs with HTML tidy. If it's not installed,
check with the W3C online validator."""))
"""Check syntax of HTML URLs with the W3C online validator."""))
group.add_option("--complete", action="store_true", dest="complete",
help=_("""Log all URLs, including duplicates.
Default is to log duplicate URLs only once."""))

815
po/de.po

File diff suppressed because it is too large Load diff

View file

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: calvin@users.sourceforge.net\n"
"POT-Creation-Date: 2012-11-13 18:11+0100\n"
"POT-Creation-Date: 2013-02-05 14:55+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"
@ -75,27 +75,31 @@ msgid ""
"I can work with ;) .\n"
msgstr ""
#: ../linkcheck/director/console.py:102
#: ../linkcheck/director/console.py:101
msgid "******** LinkChecker internal error, over and out ********"
msgstr ""
#: ../linkcheck/director/console.py:122
#: ../linkcheck/director/console.py:121
msgid "Default locale:"
msgstr ""
#: ../linkcheck/director/console.py:144
#: ../linkcheck/director/console.py:143
msgid "System info:"
msgstr ""
#: ../linkcheck/director/console.py:146 ../linkchecker:478
#: ../linkcheck/director/console.py:145 ../linkchecker:476
#, python-format
msgid "Python %(version)s on %(platform)s"
msgstr ""
#: ../linkcheck/director/console.py:153
#: ../linkcheck/director/console.py:152
msgid "Local time:"
msgstr ""
#: ../linkcheck/director/console.py:153
msgid "sys.argv:"
msgstr ""
#: ../linkcheck/director/__init__.py:48
#, python-format
msgid "Error visiting login URL %(url)s."
@ -174,62 +178,62 @@ msgid ""
"permissions."
msgstr ""
#: ../linkcheck/configuration/__init__.py:322
#: ../linkcheck/configuration/__init__.py:321
#, python-format
msgid "Configuration file %r does not exist."
msgstr ""
#: ../linkcheck/configuration/__init__.py:324
#: ../linkcheck/configuration/__init__.py:323
#, python-format
msgid "Configuration file %r is not readable."
msgstr ""
#: ../linkcheck/configuration/__init__.py:335
#: ../linkcheck/configuration/__init__.py:334
msgid "missing user or URL pattern in authentication data."
msgstr ""
#: ../linkcheck/configuration/__init__.py:383
#: ../linkcheck/configuration/__init__.py:382
msgid "activating text logger output."
msgstr ""
#: ../linkcheck/configuration/__init__.py:393
#: ../linkcheck/configuration/__init__.py:392
msgid "Clamav could not be initialized"
msgstr ""
#: ../linkcheck/configuration/__init__.py:399
#: ../linkcheck/configuration/__init__.py:398
msgid "activating sendcookies."
msgstr ""
#: ../linkcheck/configuration/__init__.py:402
#: ../linkcheck/configuration/__init__.py:401
msgid "activating storecookies."
msgstr ""
#: ../linkcheck/configuration/__init__.py:411
#: ../linkcheck/configuration/__init__.py:410
msgid "no CGI password fieldname given for login URL."
msgstr ""
#: ../linkcheck/configuration/__init__.py:415
#: ../linkcheck/configuration/__init__.py:414
msgid "no CGI user fieldname given for login URL."
msgstr ""
#: ../linkcheck/configuration/__init__.py:419
#: ../linkcheck/configuration/__init__.py:418
msgid "no user/password authentication data found for login URL."
msgstr ""
#: ../linkcheck/configuration/__init__.py:422
#: ../linkcheck/configuration/__init__.py:421
msgid "login URL is not a HTTP URL."
msgstr ""
#: ../linkcheck/configuration/__init__.py:426
#: ../linkcheck/configuration/__init__.py:425
msgid "login URL is incomplete."
msgstr ""
#: ../linkcheck/configuration/__init__.py:430
#: ../linkcheck/configuration/__init__.py:429
#, python-format
msgid "disabling login URL %(url)s."
msgstr ""
#: ../linkcheck/configuration/__init__.py:477
#: ../linkcheck/configuration/__init__.py:476
#, python-format
msgid "could not copy initial configuration file %(src)r to %(dst)r: %(errmsg)r"
msgstr ""
@ -492,136 +496,136 @@ msgstr ""
msgid "Host is empty"
msgstr ""
#: ../linkcheck/checker/unknownurl.py:145
#: ../linkcheck/checker/unknownurl.py:144
msgid "Outside of domain filter, checked only syntax."
msgstr ""
#: ../linkcheck/checker/unknownurl.py:147
#: ../linkcheck/checker/unknownurl.py:146
#, python-format
msgid "%(scheme)s URL ignored."
msgstr ""
#: ../linkcheck/checker/unknownurl.py:151
#: ../linkcheck/checker/unknownurl.py:150
msgid "URL is unrecognized or has invalid syntax"
msgstr ""
#: ../linkcheck/checker/const.py:113
#: ../linkcheck/checker/const.py:115
msgid "The effective URL is different from the original."
msgstr ""
#: ../linkcheck/checker/const.py:115
#: ../linkcheck/checker/const.py:117
msgid "Could not get the content of the URL."
msgstr ""
#: ../linkcheck/checker/const.py:116
#: ../linkcheck/checker/const.py:118
msgid "URL anchor was not found."
msgstr ""
#: ../linkcheck/checker/const.py:118
#: ../linkcheck/checker/const.py:120
msgid "The warning regular expression was found in the URL contents."
msgstr ""
#: ../linkcheck/checker/const.py:119
#: ../linkcheck/checker/const.py:121
msgid "The URL content is a duplicate of another URL."
msgstr ""
#: ../linkcheck/checker/const.py:120
#: ../linkcheck/checker/const.py:122
msgid "The URL content size is too large."
msgstr ""
#: ../linkcheck/checker/const.py:121
#: ../linkcheck/checker/const.py:123
msgid "The URL content size is zero."
msgstr ""
#: ../linkcheck/checker/const.py:122
#: ../linkcheck/checker/const.py:124
msgid "The URL content size and download size are unequal."
msgstr ""
#: ../linkcheck/checker/const.py:123
#: ../linkcheck/checker/const.py:125
msgid "The URL is longer than the recommended size."
msgstr ""
#: ../linkcheck/checker/const.py:124
#: ../linkcheck/checker/const.py:126
msgid "The URL contains leading or trailing whitespace."
msgstr ""
#: ../linkcheck/checker/const.py:125
#: ../linkcheck/checker/const.py:127
msgid "The file: URL is missing a trailing slash."
msgstr ""
#: ../linkcheck/checker/const.py:127
#: ../linkcheck/checker/const.py:129
msgid "The file: path is not the same as the system specific path."
msgstr ""
#: ../linkcheck/checker/const.py:128
#: ../linkcheck/checker/const.py:130
msgid "The ftp: URL is missing a trailing slash."
msgstr ""
#: ../linkcheck/checker/const.py:129
#: ../linkcheck/checker/const.py:131
msgid "The http: URL checking has been denied."
msgstr ""
#: ../linkcheck/checker/const.py:130
#: ../linkcheck/checker/const.py:132
msgid "The URL has moved permanently."
msgstr ""
#: ../linkcheck/checker/const.py:132
#: ../linkcheck/checker/const.py:134
msgid "The URL has been redirected to an URL of a different type."
msgstr ""
#: ../linkcheck/checker/const.py:133
#: ../linkcheck/checker/const.py:135
msgid "The URL had no content."
msgstr ""
#: ../linkcheck/checker/const.py:135
#: ../linkcheck/checker/const.py:137
msgid "An error occurred while storing a cookie."
msgstr ""
#: ../linkcheck/checker/const.py:137
#: ../linkcheck/checker/const.py:139
msgid "An error occurred while decompressing the URL content."
msgstr ""
#: ../linkcheck/checker/const.py:139
#: ../linkcheck/checker/const.py:141
msgid "The URL content is encoded with an unknown encoding."
msgstr ""
#: ../linkcheck/checker/const.py:141
#: ../linkcheck/checker/const.py:143
msgid "Unsupported HTTP authentication method."
msgstr ""
#: ../linkcheck/checker/const.py:143 ../linkcheck/checker/httpurl.py:243
#: ../linkcheck/checker/const.py:145 ../linkcheck/checker/httpurl.py:243
msgid "Unauthorized access without HTTP authentication."
msgstr ""
#: ../linkcheck/checker/const.py:144
#: ../linkcheck/checker/const.py:146
msgid "The SSL certificate is invalid or expired."
msgstr ""
#: ../linkcheck/checker/const.py:145
#: ../linkcheck/checker/const.py:147
msgid "The URL has been ignored."
msgstr ""
#: ../linkcheck/checker/const.py:146
#: ../linkcheck/checker/const.py:148
msgid "The mail MX host could not be found."
msgstr ""
#: ../linkcheck/checker/const.py:148
#: ../linkcheck/checker/const.py:150
msgid "The mailto: address could not be verified."
msgstr ""
#: ../linkcheck/checker/const.py:150
#: ../linkcheck/checker/const.py:152
msgid "No connection to a MX host could be established."
msgstr ""
#: ../linkcheck/checker/const.py:151
#: ../linkcheck/checker/const.py:153
msgid "No NNTP server was found."
msgstr ""
#: ../linkcheck/checker/const.py:152
#: ../linkcheck/checker/const.py:154
msgid "The NNTP newsgroup could not be found."
msgstr ""
#: ../linkcheck/checker/const.py:153
#: ../linkcheck/checker/const.py:155
msgid "The IP is obfuscated."
msgstr ""
@ -811,103 +815,98 @@ msgstr ""
msgid "Hostname not found"
msgstr ""
#: ../linkcheck/checker/urlbase.py:536 ../linkcheck/checker/urlbase.py:551
#: ../linkcheck/checker/urlbase.py:536 ../linkcheck/checker/urlbase.py:554
#, python-format
msgid "Bad HTTP response %(line)r"
msgstr ""
#: ../linkcheck/checker/urlbase.py:552
#: ../linkcheck/checker/urlbase.py:539
#, python-format
msgid "Bad hostname %(host)r: %(msg)s"
msgstr ""
#: ../linkcheck/checker/urlbase.py:555
#, python-format
msgid "could not get content: %(msg)s"
msgstr ""
#: ../linkcheck/checker/urlbase.py:697
#: ../linkcheck/checker/urlbase.py:700
#, python-format
msgid "Anchor `%(name)s' not found."
msgstr ""
#: ../linkcheck/checker/urlbase.py:698
#: ../linkcheck/checker/urlbase.py:701
#, python-format
msgid "Available anchors: %(anchors)s."
msgstr ""
#: ../linkcheck/checker/urlbase.py:757 ../linkcheck/checker/urlbase.py:760
#: ../linkcheck/checker/urlbase.py:760 ../linkcheck/checker/urlbase.py:763
#: ../linkcheck/checker/fileurl.py:207 ../linkcheck/checker/httpurl.py:674
#: ../linkcheck/checker/httpurl.py:682
msgid "File size too large"
msgstr ""
#: ../linkcheck/checker/urlbase.py:777
#: ../linkcheck/checker/urlbase.py:780
#, python-format
msgid " with %s"
msgstr ""
#: ../linkcheck/checker/urlbase.py:779
#: ../linkcheck/checker/urlbase.py:782
#, python-format
msgid "Content%(size)s is the same as in URLs (%(urls)s)."
msgstr ""
#: ../linkcheck/checker/urlbase.py:819
#: ../linkcheck/checker/urlbase.py:822
#, python-format
msgid "Found %(match)r at line %(line)d in link contents."
msgstr ""
#: ../linkcheck/checker/urlbase.py:835
#: ../linkcheck/checker/urlbase.py:838
msgid "Content size is zero."
msgstr ""
#: ../linkcheck/checker/urlbase.py:841
#: ../linkcheck/checker/urlbase.py:844
#, python-format
msgid "Content size %(dlsize)s is larger than %(maxbytes)s."
msgstr ""
#: ../linkcheck/checker/urlbase.py:846
#: ../linkcheck/checker/urlbase.py:849
#, python-format
msgid ""
"Download size (%(dlsize)d Byte) does not equal content size (%(size)d Byte)."
msgstr ""
#: ../linkcheck/checker/urlbase.py:867 ../linkcheck/checker/urlbase.py:932
msgid "valid HTML syntax"
msgstr ""
#: ../linkcheck/checker/urlbase.py:873
#, python-format
msgid "tidy HTML parsing caused error: %(msg)s "
msgstr ""
#: ../linkcheck/checker/urlbase.py:895 ../linkcheck/checker/urlbase.py:968
msgid "valid CSS syntax"
msgstr ""
#: ../linkcheck/checker/urlbase.py:901
#, python-format
msgid "cssutils parsing caused error: %(msg)s"
msgstr ""
#: ../linkcheck/checker/urlbase.py:910
#: ../linkcheck/checker/urlbase.py:861
#, python-format
msgid "%(w3type)s validation error at line %(line)s col %(column)s: %(msg)s"
msgstr ""
#: ../linkcheck/checker/urlbase.py:941
#: ../linkcheck/checker/urlbase.py:883
msgid "valid HTML syntax"
msgstr ""
#: ../linkcheck/checker/urlbase.py:892
#, python-format
msgid "HTML W3C validation caused error: %(msg)s "
msgstr ""
#: ../linkcheck/checker/urlbase.py:976
#: ../linkcheck/checker/urlbase.py:919
msgid "valid CSS syntax"
msgstr ""
#: ../linkcheck/checker/urlbase.py:927
#, python-format
msgid "CSS W3C validation caused error: %(msg)s "
msgstr ""
#: ../linkcheck/checker/urlbase.py:1029
#: ../linkcheck/checker/urlbase.py:980
#, python-format
msgid "%(num)d URL parsed."
msgid_plural "%(num)d URLs parsed."
msgstr[0] ""
msgstr[1] ""
#: ../linkcheck/checker/urlbase.py:1173
#: ../linkcheck/checker/urlbase.py:1126
#, python-format
msgid "URL has unparsable domain name: %(domain)s"
msgstr ""
@ -927,6 +926,16 @@ msgstr ""
msgid "Using proxy `%(proxy)s'."
msgstr ""
#: ../linkcheck/checker/dnsurl.py:47
#, python-format
msgid "%(host)s resolved to IPs %(ips)s"
msgstr ""
#: ../linkcheck/checker/dnsurl.py:49
#, python-format
msgid "%(host)r could not be resolved"
msgstr ""
#: ../linkcheck/checker/httpsurl.py:38
#, python-format
msgid "%s URL ignored."
@ -1137,35 +1146,35 @@ msgstr ""
msgid "NNTP server too busy; tried more than %d times."
msgstr ""
#: ../linkcheck/__init__.py:143
#: ../linkcheck/__init__.py:150
msgid "CRITICAL"
msgstr ""
#: ../linkcheck/__init__.py:144
#: ../linkcheck/__init__.py:151
msgid "ERROR"
msgstr ""
#: ../linkcheck/__init__.py:145
#: ../linkcheck/__init__.py:152
msgid "WARN"
msgstr ""
#: ../linkcheck/__init__.py:146
#: ../linkcheck/__init__.py:153
msgid "WARNING"
msgstr ""
#: ../linkcheck/__init__.py:147
#: ../linkcheck/__init__.py:154
msgid "INFO"
msgstr ""
#: ../linkcheck/__init__.py:148
#: ../linkcheck/__init__.py:155
msgid "DEBUG"
msgstr ""
#: ../linkcheck/__init__.py:149
#: ../linkcheck/__init__.py:156
msgid "NOTSET"
msgstr ""
#: ../linkcheck/__init__.py:160
#: ../linkcheck/__init__.py:167
msgid "Running as root user; dropping privileges by changing user to nobody."
msgstr ""
@ -1519,7 +1528,7 @@ msgstr ""
msgid "&Save"
msgstr ""
#: ../linkcheck/gui/__init__.py:160 ../linkcheck/gui/__init__.py:483
#: ../linkcheck/gui/__init__.py:160 ../linkcheck/gui/__init__.py:487
msgid "Ready."
msgstr ""
@ -1527,28 +1536,28 @@ msgstr ""
msgid "Check finished."
msgstr ""
#: ../linkcheck/gui/__init__.py:290
#: ../linkcheck/gui/__init__.py:294
msgid "Start"
msgstr ""
#: ../linkcheck/gui/__init__.py:316
#: ../linkcheck/gui/__init__.py:320
msgid "Stop"
msgstr ""
#: ../linkcheck/gui/__init__.py:362
#: ../linkcheck/gui/__init__.py:366
msgid "yes"
msgstr ""
#: ../linkcheck/gui/__init__.py:362
#: ../linkcheck/gui/__init__.py:366
msgid "no"
msgstr ""
#: ../linkcheck/gui/__init__.py:365
#: ../linkcheck/gui/__init__.py:369
#, python-format
msgid "About %(appname)s"
msgstr ""
#: ../linkcheck/gui/__init__.py:366
#: ../linkcheck/gui/__init__.py:370
#, python-format
msgid ""
"<qt><center>\n"
@ -1566,45 +1575,45 @@ msgid ""
"</center></qt>"
msgstr ""
#: ../linkcheck/gui/__init__.py:418
#: ../linkcheck/gui/__init__.py:422
#, python-format
msgid "Closing active URLs with timeout %s..."
msgstr ""
#: ../linkcheck/gui/__init__.py:433 ../linkchecker:700
#: ../linkcheck/gui/__init__.py:437 ../linkchecker:698
msgid "Dumping memory statistics..."
msgstr ""
#: ../linkcheck/gui/__init__.py:435
#: ../linkcheck/gui/__init__.py:439
msgid "LinkChecker memory dump written"
msgstr ""
#: ../linkcheck/gui/__init__.py:436 ../linkchecker:702
#: ../linkcheck/gui/__init__.py:440 ../linkchecker:700
#, python-format
msgid "The memory dump has been written to `%(filename)s'."
msgstr ""
#: ../linkcheck/gui/__init__.py:459
#: ../linkcheck/gui/__init__.py:463
msgid "Error, empty URL"
msgstr ""
#: ../linkcheck/gui/__init__.py:461
#: ../linkcheck/gui/__init__.py:465
#, python-format
msgid "Checking '%s'."
msgstr ""
#: ../linkcheck/gui/__init__.py:480
#: ../linkcheck/gui/__init__.py:484
#, python-format
msgid "%d URL selected."
msgid_plural "%d URLs selected"
msgstr[0] ""
msgstr[1] ""
#: ../linkcheck/gui/__init__.py:567
#: ../linkcheck/gui/__init__.py:571
msgid "LinkChecker internal error"
msgstr ""
#: ../linkcheck/gui/linkchecker_ui_options.py:138 ../linkchecker:368
#: ../linkcheck/gui/linkchecker_ui_options.py:138 ../linkchecker:366
msgid "Checking options"
msgstr ""
@ -1712,12 +1721,12 @@ msgstr ""
msgid "Project file %(filename)s loaded successfully."
msgstr ""
#: ../linkcheck/cmdline.py:35
#: ../linkcheck/cmdline.py:36
#, python-format
msgid "Error: %(msg)s"
msgstr ""
#: ../linkcheck/cmdline.py:36
#: ../linkcheck/cmdline.py:37
#, python-format
msgid "Execute '%(program)s -h' for help"
msgstr ""
@ -1768,61 +1777,61 @@ msgid ""
"</html>"
msgstr ""
#: ../linkcheck/strformat.py:243
#: ../linkcheck/strformat.py:244
#, python-format
msgid "%(prefix)s%(duration).02f seconds"
msgstr ""
#: ../linkcheck/strformat.py:246
#: ../linkcheck/strformat.py:247
#, python-format
msgid "%d second"
msgid_plural "%d seconds"
msgstr[0] ""
msgstr[1] ""
#: ../linkcheck/strformat.py:247
#: ../linkcheck/strformat.py:248
#, python-format
msgid "%d minute"
msgid_plural "%d minutes"
msgstr[0] ""
msgstr[1] ""
#: ../linkcheck/strformat.py:248
#: ../linkcheck/strformat.py:249
#, python-format
msgid "%d hour"
msgid_plural "%d hours"
msgstr[0] ""
msgstr[1] ""
#: ../linkcheck/strformat.py:249
#: ../linkcheck/strformat.py:250
#, python-format
msgid "%d day"
msgid_plural "%d days"
msgstr[0] ""
msgstr[1] ""
#: ../linkcheck/strformat.py:250
#: ../linkcheck/strformat.py:251
#, python-format
msgid "%d year"
msgid_plural "%d years"
msgstr[0] ""
msgstr[1] ""
#: ../linkcheck/strformat.py:319
#: ../linkcheck/strformat.py:320
#, python-format
msgid ""
"Could not import %(module)s for %(feature)s. Install %(module)s from %(url)s "
"to use this feature."
msgstr ""
#: ../linkcheck/strformat.py:331
#: ../linkcheck/strformat.py:332
#, python-format
msgid "%d hit"
msgid_plural "%d hits"
msgstr[0] ""
msgstr[1] ""
#: ../linkcheck/strformat.py:332
#: ../linkcheck/strformat.py:333
#, python-format
msgid "%d miss"
msgid_plural "%d misses"
@ -2039,24 +2048,20 @@ msgid "Output options"
msgstr ""
#: ../linkchecker:282
msgid ""
"Check syntax of CSS URLs with cssutils. If it's not installed,\n"
"check with the W3C online validator."
msgid "Check syntax of CSS URLs with the W3C online validator."
msgstr ""
#: ../linkchecker:286
msgid ""
"Check syntax of HTML URLs with HTML tidy. If it's not installed,\n"
"check with the W3C online validator."
#: ../linkchecker:285
msgid "Check syntax of HTML URLs with the W3C online validator."
msgstr ""
#: ../linkchecker:289
#: ../linkchecker:287
msgid ""
"Log all URLs, including duplicates.\n"
"Default is to log duplicate URLs only once."
msgstr ""
#: ../linkchecker:293
#: ../linkchecker:291
#, python-format
msgid ""
"Print debugging output for the given logger.\n"
@ -2068,7 +2073,7 @@ msgid ""
"For accurate results, threading will be disabled during debug runs."
msgstr ""
#: ../linkchecker:304
#: ../linkchecker:302
#, python-format
msgid ""
"Output to a file linkchecker-out.TYPE, $HOME/.linkchecker/blacklist for\n"
@ -2085,15 +2090,15 @@ msgid ""
"suppress all console output with the option '-o none'."
msgstr ""
#: ../linkchecker:318
#: ../linkchecker:316
msgid "Do not print check status messages."
msgstr ""
#: ../linkchecker:320
#: ../linkchecker:318
msgid "Don't log warnings. Default is to log warnings."
msgstr ""
#: ../linkchecker:324
#: ../linkchecker:322
#, python-format
msgid ""
"Specify output as %(loggertypes)s. Default output type is text.\n"
@ -2103,25 +2108,25 @@ msgid ""
"html."
msgstr ""
#: ../linkchecker:334
#: ../linkchecker:332
msgid ""
"Quiet operation, an alias for '-o none'.\n"
"This is only useful with -F."
msgstr ""
#: ../linkchecker:338
#: ../linkchecker:336
msgid "Scan content of URLs with ClamAV virus scanner."
msgstr ""
#: ../linkchecker:340
#: ../linkchecker:338
msgid "Print tracing information."
msgstr ""
#: ../linkchecker:343
#: ../linkchecker:341
msgid "Log all URLs. Default is to log only errors and warnings."
msgstr ""
#: ../linkchecker:349
#: ../linkchecker:347
msgid ""
"Define a regular expression which prints a warning if it matches\n"
"any content of the checked link. This applies only to valid pages,\n"
@ -2135,19 +2140,19 @@ msgid ""
"for example \"(This page has moved|Oracle Application error)\"."
msgstr ""
#: ../linkchecker:362
#: ../linkchecker:360
msgid ""
"Print a warning if content size info is available and exceeds the\n"
"given number of bytes."
msgstr ""
#: ../linkchecker:371
#: ../linkchecker:369
msgid ""
"Check HTTP anchor references. Default is not to check anchors.\n"
"This option enables logging of the warning 'url-anchor-not-found'."
msgstr ""
#: ../linkchecker:375
#: ../linkchecker:373
msgid ""
"Accept and send HTTP cookies according to RFC 2109. Only cookies\n"
"which are sent back to the originating server are accepted.\n"
@ -2155,135 +2160,135 @@ msgid ""
"information."
msgstr ""
#: ../linkchecker:382
#: ../linkchecker:380
msgid ""
"Read a file with initial cookie data. The cookie data format is\n"
"explained below."
msgstr ""
#: ../linkchecker:387
#: ../linkchecker:385
msgid ""
"Only check syntax of URLs matching the given regular expression.\n"
" This option can be given multiple times."
msgstr ""
#: ../linkchecker:392
#: ../linkchecker:390
msgid ""
"Check but do not recurse into URLs matching the given regular\n"
"expression. This option can be given multiple times."
msgstr ""
#: ../linkchecker:397
#: ../linkchecker:395
msgid ""
"Specify an NNTP server for 'news:...' links. Default is the\n"
"environment variable NNTP_SERVER. If no host is given,\n"
"only the syntax of the link is checked."
msgstr ""
#: ../linkchecker:403
#: ../linkchecker:401
msgid ""
"Read a password from console and use it for HTTP and FTP authorization.\n"
"For FTP the default password is 'anonymous@'. For HTTP there is\n"
"no default password. See also -u."
msgstr ""
#: ../linkchecker:409
#: ../linkchecker:407
msgid ""
"Pause the given number of seconds between two subsequent connection\n"
"requests to the same host. Default is no pause between requests."
msgstr ""
#: ../linkchecker:414
#: ../linkchecker:412
msgid ""
"Check recursively all links up to given depth. A negative depth\n"
"will enable infinite recursion. Default depth is infinite."
msgstr ""
#: ../linkchecker:419
#: ../linkchecker:417
#, python-format
msgid ""
"Set the timeout for connection attempts in seconds. The default\n"
"timeout is %d seconds."
msgstr ""
#: ../linkchecker:424
#: ../linkchecker:422
msgid ""
"Try the given username for HTTP and FTP authorization.\n"
"For FTP the default username is 'anonymous'. For HTTP there is\n"
"no default username. See also -p."
msgstr ""
#: ../linkchecker:430
#: ../linkchecker:428
msgid ""
"Specify the User-Agent string to send to the HTTP server, for example\n"
"\"Mozilla/4.0\". The default is \"LinkChecker/X.Y\" where X.Y is the current\n"
"version of LinkChecker."
msgstr ""
#: ../linkchecker:476
#: ../linkchecker:474
#, python-format
msgid "Invalid debug level %(level)r"
msgstr ""
#: ../linkchecker:489
#: ../linkchecker:487
#, python-format
msgid "Unreadable config file: %r"
msgstr ""
#: ../linkchecker:497
#: ../linkchecker:495
msgid "Running with python -O disables debugging."
msgstr ""
#: ../linkchecker:520 ../linkchecker:552
#: ../linkchecker:518 ../linkchecker:550
#, python-format
msgid "Unknown logger type %(type)r in %(output)r for option %(option)s"
msgstr ""
#: ../linkchecker:524 ../linkchecker:558
#: ../linkchecker:522 ../linkchecker:556
#, python-format
msgid "Unknown encoding %(encoding)r in %(output)r for option %(option)s"
msgstr ""
#: ../linkchecker:570
#: ../linkchecker:568
#, python-format
msgid "Enter LinkChecker HTTP/FTP password for user %(user)s:"
msgstr ""
#: ../linkchecker:573
#: ../linkchecker:571
msgid "Enter LinkChecker HTTP/FTP password:"
msgstr ""
#: ../linkchecker:580 ../linkchecker:598
#: ../linkchecker:578 ../linkchecker:596
#, python-format
msgid "Illegal argument %(arg)r for option %(option)s"
msgstr ""
#: ../linkchecker:636
#: ../linkchecker:634
#, python-format
msgid "Enter LinkChecker password for user %(user)s at %(strpattern)s:"
msgstr ""
#: ../linkchecker:657
#: ../linkchecker:655
#, python-format
msgid "Could not parse cookie file: %s"
msgstr ""
#: ../linkchecker:672
#: ../linkchecker:670
msgid "no files or URLs given"
msgstr ""
#: ../linkchecker:677
#: ../linkchecker:675
#, python-format
msgid ""
"Overwrite profiling file %(file)r?\n"
"Press Ctrl-C to cancel, RETURN to continue."
msgstr ""
#: ../linkchecker:683
#: ../linkchecker:681
msgid "Canceled."
msgstr ""
#: ../linkchecker:687
#: ../linkchecker:685
msgid ""
"The `cProfile' Python module is not installed, therefore the --profile option "
"is disabled."

View file

@ -109,12 +109,13 @@ MSVCP90Token = '1fc8b3b9a1e18e3b'
py_includes = ['dns.rdtypes.IN.*', 'dns.rdtypes.ANY.*',
'twill.extensions.*', 'twill.extensions.match_parse.*',
'twill.other_packages.*', 'twill.other_packages._mechanize_dist.*',
'cssutils.scripts.*']
]
# basic excludes for py2exe and py2app
py_excludes = ['doctest', 'unittest', 'optcomplete', 'Tkinter',
'PyQt4.QtDesigner', 'PyQt4.QtNetwork', 'PyQt4.QtOpenGL',
'PyQt4.QtScript', 'PyQt4.QtTest', 'PyQt4.QtWebKit', 'PyQt4.QtXml',
'PyQt4.phonon']
'PyQt4.phonon',
]
# py2exe options for Windows packaging
py2exe_options = dict(
packages=["encodings"],
@ -284,16 +285,6 @@ def sign_the_code (dist_dir):
subprocess.check_call(args)
def add_tidy_files (files):
"""Add C tidy library used with ctypes."""
libname = "cygtidy"
libver = "0-99-0"
lib = "%s-%s.dll" % (libname, libver)
import tidy
filename = os.path.join(os.path.dirname(tidy.__file__), lib)
files.append(('', [filename]))
def add_msvc_files (files):
"""Add needed MSVC++ runtime files. Only Version 9.0.21022.8 is tested
and can be downloaded here:
@ -673,7 +664,6 @@ elif 'py2exe' in sys.argv[1:]:
raise SystemExit("py2exe module could not be imported")
add_qt_plugin_files(data_files)
add_msvc_files(data_files)
add_tidy_files(data_files)
insert_dns_path()
elif do_freeze:
class MyInstallExe (install_exe, object):
@ -958,8 +948,6 @@ o a command line, GUI and web interface
# Commented out since they are untested and not officially supported.
# See also doc/install.txt for more detailed dependency documentation.
#extra_requires = {
# "HTML syntax check": ['tidy'], # http://utidylib.berlios.de/
# "CSS syntax check": ['cssutils'], # http://cthedot.de/cssutils/
# "IP country info": ['GeoIP'], # http://www.maxmind.com/app/python
# "Login form": ['twill'], # http://twill.idyll.org/
# "GNOME proxies": ['pygtk'], # http://www.pygtk.org/downloads.html