Use direct HTML documentation for the GUI client; moved the homepage content to a separate package.

This commit is contained in:
Bastian Kleineidam 2009-07-20 18:33:09 +02:00
parent fd29a15af7
commit 3121e3385e
14 changed files with 1883 additions and 1252 deletions

View file

@ -9,7 +9,7 @@ Fixes:
servers which close persistent connections unexpectedly.
- bookmarks: correctly read the bookmark title from Mozilla places.sqllite
- checking: ignore the fragment part (ie. the anchor) of URIs when
getting and caching content; follows the HTTP/1.1 specification which
getting and caching HTTP content; follows the HTTP/1.1 specification which
does not include fragments in the protocol. Thanks to Martin von Gagern
for pointing this out.
This also deprecates the --no-anchor-caching option which will be

View file

@ -35,15 +35,13 @@ recursive-include linkcheck/gui/rc Makefile *.png *.qrc
recursive-include linkcheck/gui/ui *.ui
include po/*.po po/*.pot po/Makefile
include doc/*.example
include doc/*.png
include doc/*.jpg
include doc/*.ico
include doc/*.html
include doc/po4a.conf doc/*.po doc/*.pot
include doc/en/*.1 doc/en/*.5
include doc/de/*.1 doc/de/*.5
include doc/Makefile
include doc/mediacompress.py
include doc/examples/*.sh
include doc/source/*.txt
include doc/source/*.jpg
include doc/source/conf.py
include doc/source/static/*
include doc/source/templates/*
include linkcheck/dns/ChangeLog

View file

@ -1,5 +1,5 @@
# This Makefile is only used by developers.
PYVER=2.5
PYVER=2.6
PYTHON=python$(PYVER)
VERSION=$(shell $(PYTHON) setup.py --version)
MACHINE=$(shell uname -m)

View file

@ -4,3 +4,6 @@
+ Show detailed URL properties
+ View source
- [GUI] Save options in qsettings.
- [PYTHON3]
/home/calvin/src/linkchecker-git/linkcheck/dns/resolver.py:313: DeprecationWarning: in 3.x, __getslice__ has been removed; use __getitem__
linkcheck.dns.name.Name(linkcheck.dns.name.from_text(socket.gethostname())[1:])

View file

@ -1,114 +1,24 @@
# Makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER = a4
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
.PHONY: help clean html web pickle htmlhelp latex changes linkcheck
all:
@echo "Available targets: build-html build-htmlhelp"
build-html: clean html
build-htmlhelp: clean htmlhelp helpfiles
html:
mkdir -p build/html build/doctrees
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) build/html
-rm build/html/_static/Makefile
-rm build/html/_static/default.css
-rm build/html/_static/plus.png
-rm build/html/_static/minus.png
@echo
@echo "Build finished. The HTML pages are in build/html."
htmlhelp:
mkdir -p build/htmlhelp build/doctrees
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) build/htmlhelp
-rm build/htmlhelp/LinkChecker*
-rm build/htmlhelp/_static/Makefile
-rm build/htmlhelp/_static/default.css
-rm build/htmlhelp/_static/*.js
-rm build/htmlhelp/_static/plus.png
-rm build/htmlhelp/_static/minus.png
-rm build/htmlhelp/_static/rightsidebar.css
-rm build/htmlhelp/_static/stickysidebar.css
-rm build/htmlhelp/_static/traditional.css
@echo
@echo "Build finished. The HTML pages are in build/htmlhelp."
pickle:
mkdir -p build/pickle build/doctrees
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) build/pickle
@echo
@echo "Build finished; now you can process the pickle files."
web: pickle
json:
mkdir -p build/json build/doctrees
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) build/json
@echo
@echo "Build finished; now you can process the JSON files."
latex:
mkdir -p build/latex build/doctrees
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) build/latex
@echo
@echo "Build finished; the LaTeX files are in build/latex."
@echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
"run these through (pdf)latex."
changes:
mkdir -p build/changes build/doctrees
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) build/changes
@echo
@echo "The overview file is in build/changes."
linkcheck:
mkdir -p build/linkcheck build/doctrees
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) build/linkcheck
@echo
@echo "Link check complete; look for any errors in the above output " \
"or in build/linkcheck/output.txt."
clean:
-rm -rf build/*
-rm -f *.qhc *.qch
test: html
xmllint --valid --noout build/html/*.html
YUICOMP_VERSION=2.4.2
YUICOMP=$(HOME)/src/yuicompressor-$(YUICOMP_VERSION)/build
compress:
python mediacompress.py --overwrite=png,jpg,gif,js,css \
--js-compressor=$(YUICOMP)/yuicompressor-$(YUICOMP_VERSION).jar \
build
HELPFILES = lccollection.qhc
helpfiles: htmlhelp $(HELPFILES)
all: $(HELPFILES)
clean:
-rm -f *.qhc *.qch
test:
xmllint --valid --noout *.html
%.qhc: %.qhcp lcdoc.qhp
qcollectiongenerator $< -o $@
homepage: build-html compress
cp -r build/html/* $(HOME)/public_html/linkchecker.sf.net/htdocs
po4a:
po4a --localized-charset=UTF-8 po4a.conf
api:
epydoc --html -o api --name "LinkChecker source documentation" --url ../index.html ../linkcheck/
.PHONY: po4a api clean
favicon.ico: favicon32x32.png favicon16x16.png
png2ico favicon.ico favicon32x32.png favicon16x16.png

1650
doc/de.po

File diff suppressed because it is too large Load diff

View file

@ -206,12 +206,6 @@ erklärt.
Prüfe HTTP Ankerverweise. Standard ist, Ankerverweise nicht zu prüfen. Diese
Option aktiviert die Ausgabe der Warnung \fBurl\-anchor\-not\-found\fP.
.TP
\fB\-\-no\-anchor\-caching\fP
Behandle url#anchora und url#anchorb beim Cachen als gleich. Dies ist zwar
Standard bei Browsern, aber in der URI Spezifikation nicht
enthalten. Benutzen Sie diese Option mit Vorsicht da ungültige Anker mit
dieser Option nicht unbedingt erkannt werden.
.TP
\fB\-u\fP\fINAME\fP, \fB\-\-user=\fP\fINAME\fP
Verwende den angegebenen Benutzernamen für HTTP und FTP Autorisierung. Für
FTP ist der Standardname \fBanonymous\fP. Für HTTP gibt es keinen

View file

@ -64,14 +64,6 @@ korrekte Syntax des Links geprüft.
.br
Kommandozeilenoption: \fB\-\-nntp\-server\fP
.TP
\fBanchorcaching=\fP[\fB0\fP|\fB1\fP]
Falls auf Null gesetzt, behandle url#anchora und url#anchorb beim Cachen als
gleich. Dies ist zwar Standard bei Browsern, aber in der URI Spezifikation
nicht enthalten. Benutzen Sie diese Option mit Vorsicht da ungültige Anker
mit dieser Option nicht unbedingt erkannt werden.
.br
Kommandozeilenoption: \fB\-\-no\-anchor\-caching\fP
.TP
\fBcheckhtml=\fP[\fB0\fP|\fB1\fP]
Prüfe Syntax von HTML URLs mit lokaler Bibliothek (HTML tidy).
.br

View file

@ -208,12 +208,6 @@ format is explained below.
Check HTTP anchor references. Default is not to check anchors.
This option enables logging of the warning \fBurl\-anchor\-not\-found\fP.
.TP
\fB\-\-no\-anchor\-caching\fP
Treat url#anchora and url#anchorb as equal on caching. This
is the default browser behaviour, but it's not specified in
the URI specification. Use with care since broken anchors are not
guaranteed to be detected in this mode.
.TP
\fB\-u\fP\fISTRING\fP, \fB\-\-user=\fP\fISTRING\fP
Try the given username for HTTP and FTP authorization.
For FTP the default username is \fBanonymous\fP. For HTTP there is
@ -348,6 +342,138 @@ Setting a proxy on the Windows command prompt:
set http_proxy=http://proxy.example.com:8080
.SH PERFORMED CHECKES
All URLs have to pass a preliminary syntax test. Minor quoting
mistakes will issue a warning, all other invalid syntax issues
are errors.
After the syntax check passes, the URL is queued for connection
checking. All connection check types are described below.
.
.TP
HTTP links (\fBhttp:\fP, \fBhttps:\fP)
After connecting to the given HTTP server the given path
or query is requested. All redirections are followed, and
if user/password is given it will be used as authorization
when necessary.
Permanently moved pages issue a warning.
All final HTTP status codes other than 2xx are errors.
.
HTML page contents are checked for recursion.
.TP
Local files (\fBfile:\fP)
A regular, readable file that can be opened is valid. A readable
directory is also valid. All other files, for example device files,
unreadable or non-existing files are errors.
.
HTML or other parseable file contents are checked for recursion.
.TP
Mail links (\fBmailto:\fP)
A mailto: link eventually resolves to a list of email addresses.
If one address fails, the whole list will fail.
For each mail address we check the following things:
.
1) Check the adress syntax, both of the part before and after
the @ sign.
2) Look up the MX DNS records. If we found no MX record,
print an error.
3) Check if one of the mail hosts accept an SMTP connection.
Check hosts with higher priority first.
If no host accepts SMTP, we print a warning.
4) Try to verify the address with the VRFY command. If we got
an answer, print the verified address as an info.
.TP
FTP links (\fBftp:\fP)
For FTP links we do:
1) connect to the specified host
2) try to login with the given user and password. The default
user is ``anonymous``, the default password is ``anonymous@``.
3) try to change to the given directory
4) list the file with the NLST command
- Telnet links (``telnet:``)
We try to connect and if user/password are given, login to the
given telnet server.
- NNTP links (``news:``, ``snews:``, ``nntp``)
We try to connect to the given NNTP server. If a news group or
article is specified, try to request it from the server.
- Ignored links (``javascript:``, etc.)
An ignored link will only print a warning. No further checking
will be made.
Here is a complete list of recognized, but ignored links. The most
prominent of them should be JavaScript links.
- ``acap:`` (application configuration access protocol)
- ``afs:`` (Andrew File System global file names)
- ``chrome:`` (Mozilla specific)
- ``cid:`` (content identifier)
- ``clsid:`` (Microsoft specific)
- ``data:`` (data)
- ``dav:`` (dav)
- ``fax:`` (fax)
- ``find:`` (Mozilla specific)
- ``gopher:`` (Gopher)
- ``imap:`` (internet message access protocol)
- ``isbn:`` (ISBN (int. book numbers))
- ``javascript:`` (JavaScript)
- ``ldap:`` (Lightweight Directory Access Protocol)
- ``mailserver:`` (Access to data available from mail servers)
- ``mid:`` (message identifier)
- ``mms:`` (multimedia stream)
- ``modem:`` (modem)
- ``nfs:`` (network file system protocol)
- ``opaquelocktoken:`` (opaquelocktoken)
- ``pop:`` (Post Office Protocol v3)
- ``prospero:`` (Prospero Directory Service)
- ``rsync:`` (rsync protocol)
- ``rtsp:`` (real time streaming protocol)
- ``service:`` (service location)
- ``shttp:`` (secure HTTP)
- ``sip:`` (session initiation protocol)
- ``tel:`` (telephone)
- ``tip:`` (Transaction Internet Protocol)
- ``tn3270:`` (Interactive 3270 emulation sessions)
- ``vemmi:`` (versatile multimedia interface)
- ``wais:`` (Wide Area Information Servers)
- ``z39.50r:`` (Z39.50 Retrieval)
- ``z39.50s:`` (Z39.50 Session)
.SH RECURSION
Before descending recursively into a URL, it has to fulfill several
conditions. They are checked in this order:
1. A URL must be valid.
2. A URL must be parseable. This currently includes HTML files,
Opera bookmarks files, and directories. If a file type cannot
be determined (for example it does not have a common HTML file
extension, and the content does not look like HTML), it is assumed
to be non-parseable.
3. The URL content must be retrievable. This is usually the case
except for example mailto: or unknown URL types.
4. The maximum recursion level must not be exceeded. It is configured
with the ``--recursion-level`` option and is unlimited per default.
5. It must not match the ignored URL list. This is controlled with
the ``--ignore-url`` option.
6. The Robots Exclusion Protocol must allow links in the URL to be
followed recursively. This is checked by searching for a
"nofollow" directive in the HTML header data.
Note that the directory recursion reads all files in that
directory, not just a subset like ``index.htm*``.
.SH NOTES
URLs on the commandline starting with \fBftp.\fP are treated like
\fBftp://ftp.\fP, URLs starting with \fBwww.\fP are treated like

View file

@ -58,14 +58,6 @@ only the syntax of the link is checked.
.br
Command line option: \fB\-\-nntp\-server\fP
.TP
\fBanchorcaching=\fP[\fB0\fP|\fB1\fP]
If set to zero, treat url#anchora and url#anchorb as equal on caching.
This is the default browser behaviour, but it's not specified in
the URI specification. Use with care since broken anchors are not
guaranteed to be detected in this mode.
.br
Command line option: \fB\-\-no\-anchor\-caching\fP
.TP
\fBcheckhtml=\fP[\fB0\fP|\fB1\fP]
Check syntax of HTML URLs with local library (HTML tidy).
.br

View file

@ -4,7 +4,7 @@
<title>LinkChecker</title>
<applicationIcon>build/htmlhelp/_static/favicon16x16.png</applicationIcon>
<cacheDirectory>bfk/LinkChecker</cacheDirectory>
<startPage>qthelp://bfk.app.linkchecker/doc/build/htmlhelp/documentation.html</startPage>
<startPage>qthelp://bfk.app.linkchecker/doc/index.html</startPage>
<enableDocumentationManager>false</enableDocumentationManager>
<enableAddressBar>false</enableAddressBar>
<enableFilterFunctionality>false</enableFilterFunctionality>

View file

@ -4,10 +4,10 @@
<virtualFolder>doc</virtualFolder>
<filterSection>
<toc>
<section title="LinkChecker Application Manual" ref="build/htmlhelp/documentation.html" />
<section title="LinkChecker Application Manual" ref="index.html" />
</toc>
<files>
<file>build/htmlhelp/documentation.html</file>
<file>index.html</file>
</files>
</filterSection>
</QtHelpProject>

File diff suppressed because it is too large Load diff

View file

@ -30,7 +30,7 @@ from .. import configuration, checker, director, add_intern_pattern, \
from ..containers import enum
DocBaseUrl = "qthelp://bfk.app.linkchecker/doc/build/htmlhelp/"
DocBaseUrl = "qthelp://bfk.app.linkchecker/doc/"
Status = enum('idle', 'checking')
@ -115,7 +115,7 @@ class LinkCheckerMain (QtGui.QMainWindow, Ui_MainWindow):
@QtCore.pyqtSignature("")
def on_actionHelp_triggered (self):
"""Show help page."""
url = QtCore.QUrl("%sdocumentation.html" % DocBaseUrl)
url = QtCore.QUrl("%sindex.html" % DocBaseUrl)
self.assistant.showDocumentation(url)
@QtCore.pyqtSignature("")