mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-05-04 12:54:42 +00:00
commit
0920508413
3 changed files with 11 additions and 12 deletions
|
|
@ -38,7 +38,6 @@ HtmlAuthor = Author.replace(' ', ' ')
|
|||
Copyright = "Copyright (C) 2000-2016 Bastian Kleineidam, 2010-2020 " + Author
|
||||
HtmlCopyright = ("Copyright © 2000-2016 Bastian Kleineidam, 2010-2020 "
|
||||
+ HtmlAuthor)
|
||||
AppInfo = App + " " + Copyright
|
||||
HtmlAppInfo = App + ", " + HtmlCopyright
|
||||
Url = configdata.url
|
||||
SupportUrl = "https://github.com/linkchecker/linkchecker/issues"
|
||||
|
|
@ -46,9 +45,8 @@ UserAgent = "Mozilla/5.0 (compatible; %s/%s; +%s)" % (AppName, Version, Url)
|
|||
Freeware = (
|
||||
AppName
|
||||
+ """ comes with ABSOLUTELY NO WARRANTY!
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions. Look at the file `LICENSE' within this
|
||||
distribution."""
|
||||
This is free software, and you are welcome to redistribute it under
|
||||
certain conditions. Look at the file `LICENSE' within this distribution."""
|
||||
)
|
||||
Portable = configdata.portable
|
||||
|
||||
|
|
|
|||
|
|
@ -93,7 +93,8 @@ class TextLogger(_Logger):
|
|||
|
||||
def write_intro(self):
|
||||
"""Log introduction text."""
|
||||
self.writeln(configuration.AppInfo)
|
||||
self.writeln(configuration.App)
|
||||
self.writeln(configuration.Copyright)
|
||||
self.writeln(configuration.Freeware)
|
||||
self.writeln(
|
||||
_("Get the newest version at %(url)s") % {'url': configuration.Url}
|
||||
|
|
|
|||
14
linkchecker
14
linkchecker
|
|
@ -28,7 +28,7 @@ import getpass
|
|||
|
||||
# installs _() and _n() gettext functions into global namespace
|
||||
import linkcheck
|
||||
logconf = linkcheck.logconf
|
||||
from linkcheck import log, logconf
|
||||
LOG_CMDLINE = linkcheck.LOG_CMDLINE
|
||||
|
||||
logconf.init_log_config()
|
||||
|
|
@ -42,13 +42,13 @@ from linkcheck.cmdline import (
|
|||
LCArgumentParser,
|
||||
print_plugins,
|
||||
)
|
||||
from linkcheck import log, i18n, strformat
|
||||
import linkcheck.checker
|
||||
import linkcheck.configuration
|
||||
import linkcheck.fileutil
|
||||
import linkcheck.logger
|
||||
import linkcheck.ansicolor
|
||||
from linkcheck.director import console, check_urls, get_aggregate
|
||||
from linkcheck.strformat import stripurl
|
||||
|
||||
# optional modules
|
||||
has_argcomplete = linkcheck.fileutil.has_module("argcomplete")
|
||||
|
|
@ -109,7 +109,7 @@ Setting a proxy on the Windows command prompt:
|
|||
RegularExpressions = _(
|
||||
"""REGULAR EXPRESSIONS
|
||||
Only Python regular expressions are accepted by LinkChecker.
|
||||
See http://www.amk.ca/python/howto/regex/ for an introduction in
|
||||
See https://docs.python.org/howto/regex.html for an introduction in
|
||||
regular expressions.
|
||||
|
||||
The only addition is that a leading exclamation mark negates
|
||||
|
|
@ -325,7 +325,7 @@ group.add_argument(
|
|||
"The ENCODING specifies the output encoding, the default is that of your\n"
|
||||
"locale.\n"
|
||||
"Valid encodings are listed at "
|
||||
"http://docs.python.org/lib/standard-encodings.html.\n"
|
||||
"https://docs.python.org/library/codecs.html#standard-encodings.\n"
|
||||
"The FILENAME and ENCODING parts of the 'none' output type will be ignored,\n"
|
||||
"else if the file already exists, it will be overwritten.\n"
|
||||
"You can specify this option more than once. Valid file output types\n"
|
||||
|
|
@ -358,7 +358,7 @@ group.add_argument(
|
|||
"The ENCODING specifies the output encoding, the default is that of your\n"
|
||||
"locale.\n"
|
||||
"Valid encodings are listed at "
|
||||
"http://docs.python.org/lib/standard-encodings.html."
|
||||
"https://docs.python.org/library/codecs.html#standard-encodings."
|
||||
)
|
||||
% {"loggertypes": linkcheck.logger.LoggerKeys},
|
||||
)
|
||||
|
|
@ -578,7 +578,7 @@ if options.output:
|
|||
if "/" in options.output:
|
||||
logtype, encoding = options.output.split("/", 1)
|
||||
else:
|
||||
logtype, encoding = options.output, i18n.default_encoding
|
||||
logtype, encoding = options.output, linkcheck.i18n.default_encoding
|
||||
logtype = logtype.lower()
|
||||
if logtype == "blacklist":
|
||||
log.warn(
|
||||
|
|
@ -734,7 +734,7 @@ if options.stdin:
|
|||
aggregate_url(aggregate, url)
|
||||
elif options.url:
|
||||
for url in options.url:
|
||||
aggregate_url(aggregate, strformat.stripurl(url))
|
||||
aggregate_url(aggregate, stripurl(url))
|
||||
else:
|
||||
log.warn(LOG_CMDLINE, _("no files or URLs given"))
|
||||
# set up profiling
|
||||
|
|
|
|||
Loading…
Reference in a new issue