Move GUI client into package.

git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@3903 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
calvin 2009-01-11 00:26:42 +00:00
parent 17bbc9ab59
commit 73206acbcb
33 changed files with 248 additions and 76 deletions

View file

@ -1,4 +1,4 @@
4.10 "Iron Man" (released xx.12.2008)
5.0 "Iron Man" (released xx.12.2008)
* Require and use Python >= 2.5.
Type: feature

View file

@ -30,7 +30,9 @@ include linkcheck/HtmlParser/htmllex.l
include linkcheck/HtmlParser/htmlparse.y
include linkcheck/HtmlParser/*.h
include linkcheck/HtmlParser/fixincludes.awk
include linkcheck/ftpparse/*.h
include linkcheck/gui/Makefile
recursive-include linkcheck/gui/rc Makefile *.png *.qrc
recursive-include linkcheck/gui/ui *.ui
include po/*.po po/*.pot po/Makefile
include doc/*.py doc/*.example
include doc/po4a.conf doc/*.po doc/*.pot

2
debian/.gitignore vendored
View file

@ -2,4 +2,6 @@
/*.debhelper
/*.debhelper.log
/linkchecker
/linkchecker-gui
/tmp
/*.substvars

18
debian/README.Debian vendored
View file

@ -1,15 +1,7 @@
Web Interface
==============
On Debian systems, you have a simple CGI script located at:
http://localhost/lconline/index.html
For this to work, your web server must have content negotiation enabled
(with "sudo a2enmod negotiation").
Otherwise you have to for one language XY the file extensions of the
.html.XY files.
Note that only the local host (ie. 127.0.0.1) can serve and access this
script. If you want to enable access from or to other hosts you have
to adjust the ALLOWED_CLIENTS and ALLOWED_SERVERS variables in
the /usr/lib/cgi-bin/lc.cgi script.
The web interface can be configured with
- adding your host IP in the /etc/apache2/conf.d/linkchecker and
uncommenting the deny/allow lines for the CGI script
- executing "sudo a2enmod negotiation"
- accessing http://localhost/lconline/index.html

22
debian/control vendored
View file

@ -11,10 +11,10 @@ Homepage: http://linkchecker.sourceforge.net/
Package: linkchecker
Architecture: any
Depends: ${python:Depends}, ${shlibs:Depends}
Depends: ${python:Depends}, ${shlibs:Depends}, ${misc:Depends}
XB-Python-Version: ${python:Versions}
Provides: ${python:Provides}
Suggests: apache | httpd, python-optcomplete (>= 1.2-5),
Suggests: apache2 | httpd, python-optcomplete (>= 1.2-5),
python-geoip (>= 1.2.1-2), clamav-daemon, python-utidylib,
python-cssutils, python-pysqlite2
Description: check websites and HTML documents for broken links
@ -35,4 +35,22 @@ Description: check websites and HTML documents for broken links
o i18n support
o HTML and CSS syntax check
o Antivirus check
Users preferring a graphical interface can install the linkchecker-gui
package.
Package: linkchecker-gui
Architecture: all
XB-Python-Version: ${python:Versions}
Depends: linkchecker, python-qt4, ${python:Depends}, ${misc:Depends}
Description: check websites and HTML documents for broken links (GUI client)
Provides a graphical interface "linkchecker-gui" to check links of websites
and HTML documents.
Features:
o recursive checking
o multithreaded
o HTTP/1.1, HTTPS, FTP, mailto:, news:, nntp:, Telnet and local file
links support
o proxy support
o username/password authorization for HTTP, FTP and Telnet
o robots.txt exclusion protocol support
o i18n support

20
debian/control.gui vendored
View file

@ -1,20 +0,0 @@
[.. add to linkchecker description:]
Users preferring a graphical interface can install the linkchecker-gui
package.
Package: linkchecker-gui
Architecture: all
Depends: linkchecker, python-qt4
Description: check websites and HTML documents for broken links (GUI version)
Provides a graphical interface "linkchecker-gui" to check links of websites
and HTML documents.
Features:
o recursive checking
o multithreaded
o HTTP/1.1, HTTPS, FTP, mailto:, news:, nntp:, Telnet and local file
links support
o proxy support
o username/password authorization for HTTP, FTP and Telnet
o robots.txt exclusion protocol support
o i18n support

2
debian/linkchecker-gui.install vendored Normal file
View file

@ -0,0 +1,2 @@
usr/bin/linkchecker-gui
usr/lib/python2.5/site-packages/linkcheck/gui

18
debian/linkchecker.apache.conf vendored Normal file
View file

@ -0,0 +1,18 @@
Alias /lconline/ /usr/share/linkchecker/htdocs/
# allow people to read the files in htdocs
<Directory "/usr/share/linkchecker/htdocs/">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
<Location "/cgi-bin/lc.cgi">
Order deny,allow
# Before uncommenting the following lines please put IP address
# of your computer in the Allow line
# Deny from all
# Allow from 127.0.0.0/255.0.0.0 REPLACE-WITH.YOUR-HOST.IP-ADDRESS
# IPv6 addresses work only with apache2
# Allow from ::1/128
</Location>

View file

@ -1,5 +1,6 @@
etc/linkchecker
usr/lib/cgi-bin/lconline
var/www/lconline
etc/apache2/conf.d
etc/bash_completion.d
etc/linkchecker
usr/lib/cgi-bin
usr/share/locale/de/LC_MESSAGES
usr/share/linkchecker/lconline

View file

@ -2,3 +2,4 @@ doc/examples/check_blacklist.sh
doc/examples/check_for_x_errors.sh
doc/examples/check_urls.sh
doc/robots.txt.example
cgi-bin/lc.fcgi

13
debian/linkchecker.install vendored Normal file
View file

@ -0,0 +1,13 @@
usr/bin/linkchecker
usr/share/man
usr/lib/python2.5/site-packages/_linkchecker_configdata.py
usr/lib/python2.5/site-packages/linkcheck/*.py
usr/lib/python2.5/site-packages/linkcheck/HtmlParser
usr/lib/python2.5/site-packages/linkcheck/cache
usr/lib/python2.5/site-packages/linkcheck/checker
usr/lib/python2.5/site-packages/linkcheck/configuration
usr/lib/python2.5/site-packages/linkcheck/director
usr/lib/python2.5/site-packages/linkcheck/dns
usr/lib/python2.5/site-packages/linkcheck/htmlutil
usr/lib/python2.5/site-packages/linkcheck/logger
usr/lib/python2.5/site-packages/linkcheck/network

21
debian/rules vendored
View file

@ -9,12 +9,11 @@ common-install-arch::
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/python-distutils.mk
PACKAGE=linkchecker
ROOT=$(CURDIR)/debian/$(PACKAGE)
DOCDIR=$(ROOT)/usr/share/doc/$(PACKAGE)
CGIDIR=$(ROOT)/usr/lib/cgi-bin/lconline
HTMLDIR=$(ROOT)/var/www/lconline
SHARE=$(ROOT)/usr/share/$(PACKAGE)
ROOT=$(CURDIR)/debian/linkchecker
DOCDIR=$(ROOT)/usr/share/doc/linkchecker
SHARE=$(ROOT)/usr/share/linkchecker
HTMLDIR=$(SHARE)/lconline
CGIDIR=$(ROOT)/usr/lib/cgi-bin
LOCALE=$(ROOT)/usr/share/locale
ETC=$(ROOT)/etc
@ -22,11 +21,9 @@ common-configure-arch::
python setup.py sdist --manifest-only
common-install-arch::
# remove example files, we install them with dh_installexamples
rm -r $(ROOT)/usr/share/linkchecker/examples
# install system wide configuration files in etc
mv $(SHARE)/linkcheckerrc $(ETC)/$(PACKAGE)/
mv $(SHARE)/logging.conf $(ETC)/$(PACKAGE)/
install -m 644 config/linkcheckerrc $(ETC)/linkchecker/
install -m 644 config/logging.conf $(ETC)/linkchecker/
# install CGI files
install -m 644 cgi-bin/lconline/*.html $(HTMLDIR)
install -m 644 cgi-bin/lconline/*.de $(HTMLDIR)
@ -34,9 +31,9 @@ common-install-arch::
install -m 644 cgi-bin/lconline/*.js $(HTMLDIR)
install -m 644 cgi-bin/lconline/*.css $(HTMLDIR)
install -m 755 cgi-bin/lc.cgi $(CGIDIR)
install -m 755 cgi-bin/lc.fcgi $(CGIDIR)
# install bash_completion script
install -m 644 config/linkchecker-completion $(ETC)/bash_completion.d
# install .mo files
install -m 644 build/share/locale/de/LC_MESSAGES/linkchecker.mo $(LOCALE)/de/LC_MESSAGES/
# apache configuration
install -m 644 debian/linkchecker.apache.conf $(ETC)/apache2/conf.d/linkchecker

View file

@ -5,8 +5,8 @@
msgid ""
msgstr ""
"Project-Id-Version: linkchecker 3.4\n"
"POT-Creation-Date: 2008-11-30 20:31+0100\n"
"PO-Revision-Date: 2008-11-30 20:33+0100\n"
"POT-Creation-Date: 2009-01-11 01:15+0100\n"
"PO-Revision-Date: 2009-01-11 01:17+0100\n"
"Last-Translator: Bastian Kleineidam <calvin@users.sourceforge.net>\n"
"Language-Team: de <de@li.org>\n"
"MIME-Version: 1.0\n"
@ -41,6 +41,7 @@ msgstr "LinkChecker auf der Kommandozeile"
# type: SH
#: en/linkchecker.1:2
#: en/linkcheckerrc.5:2
#: en/linkchecker-gui.1:2
#, no-wrap
msgid "NAME"
msgstr "NAME"
@ -52,6 +53,7 @@ msgstr "linkchecker - prüfe HTML Dokumente und Webseiten auf ungültige Verknü
# type: SH
#: en/linkchecker.1:5
#: en/linkchecker-gui.1:5
#, no-wrap
msgid "SYNOPSIS"
msgstr "SYNTAX"
@ -64,6 +66,7 @@ msgstr "B<linkchecker> [I<Optionen>] [I<Datei-oder-URL>]..."
# type: SH
#: en/linkchecker.1:8
#: en/linkcheckerrc.5:5
#: en/linkchecker-gui.1:8
#, no-wrap
msgid "DESCRIPTION"
msgstr "BESCHREIBUNG"
@ -1078,6 +1081,7 @@ msgstr "B<http://www.amk.ca/python/howto/regex/> - Dokumentation zu regulären A
# type: SH
#: en/linkchecker.1:407
#: en/linkcheckerrc.5:417
#: en/linkchecker-gui.1:11
#, no-wrap
msgid "SEE ALSO"
msgstr "SIEHE AUCH"
@ -1090,6 +1094,7 @@ msgstr "B<linkcheckerrc>(5)"
# type: SH
#: en/linkchecker.1:410
#: en/linkcheckerrc.5:420
#: en/linkchecker-gui.1:14
#, no-wrap
msgid "AUTHOR"
msgstr "AUTHOR"
@ -1097,12 +1102,14 @@ msgstr "AUTHOR"
# type: Plain text
#: en/linkchecker.1:412
#: en/linkcheckerrc.5:422
#: en/linkchecker-gui.1:16
msgid "Bastian Kleineidam E<lt>calvin@users.sourceforge.netE<gt>"
msgstr "Bastian Kleineidam E<lt>calvin@users.sourceforge.netE<gt>"
# type: SH
#: en/linkchecker.1:413
#: en/linkcheckerrc.5:423
#: en/linkchecker-gui.1:17
#, no-wrap
msgid "COPYRIGHT"
msgstr "COPYRIGHT"
@ -2056,3 +2063,52 @@ msgstr ""
msgid "linkchecker(1)"
msgstr "BEISPIEL"
# type: TH
#: en/linkchecker-gui.1:1
#, no-wrap
msgid "LINKCHECKER-GUI"
msgstr "LINKCHECKER-GUI"
# type: TH
#: en/linkchecker-gui.1:1
#, no-wrap
msgid "2009-01-10"
msgstr "2009-01-10"
# type: TH
#: en/linkchecker-gui.1:1
#, no-wrap
msgid "LinkChecker GUI"
msgstr "LinkChecker GUI"
# type: TH
#: en/linkchecker-gui.1:1
#, no-wrap
msgid "LinkChecker GUI client"
msgstr "LinkChecker GUI Programm"
# type: Plain text
#: en/linkchecker-gui.1:4
msgid "linkchecker-gui - GUI client to check links of websites and HTML documents"
msgstr "linkchecker-gui - GUI-Programm zum Prüfen von Verknüpfungen von Webseiten und HTML Dokumenten"
# type: TH
#: en/linkchecker-gui.1:7
msgid "B<linkchecker-gui>"
msgstr "B<linkchecker-gui>"
# type: Plain text
#: en/linkchecker-gui.1:10
msgid "A graphical interface to check links of websites and HTML documents."
msgstr "Eine graphische Benutzeroberfläche, um Verknüpfungen von Webseiten und HTML Dokumenten zu prüfen."
# type: TH
#: en/linkchecker-gui.1:13
msgid "B<linkchecker>(1)"
msgstr "B<linkchecker>(1)"
# type: Plain text
#: en/linkchecker-gui.1:18
msgid "Copyright \\(co 2009 Bastian Kleineidam"
msgstr "Copyright \\(co 2009 Bastian Kleineidam"

25
doc/de/linkchecker-gui.1 Normal file
View file

@ -0,0 +1,25 @@
.\"*******************************************************************
.\"
.\" This file was generated with po4a. Translate the source file.
.\"
.\"*******************************************************************
.TH LINKCHECKER\-GUI 1 2009\-01\-10 "LinkChecker GUI" "LinkChecker GUI Programm"
.SH NAME
linkchecker\-gui \- GUI\-Programm zum Prüfen von Verknüpfungen von Webseiten
und HTML Dokumenten
.
.SH SYNTAX
\fBlinkchecker\-gui\fP
.
.SH BESCHREIBUNG
Eine graphische Benutzeroberfläche, um Verknüpfungen von Webseiten und HTML
Dokumenten zu prüfen.
.SH "SIEHE AUCH"
\fBlinkchecker\fP(1)
.
.SH AUTHOR
Bastian Kleineidam <calvin@users.sourceforge.net>
.
.SH COPYRIGHT
Copyright \(co 2009 Bastian Kleineidam

18
doc/en/linkchecker-gui.1 Normal file
View file

@ -0,0 +1,18 @@
.TH LINKCHECKER-GUI 1 2009-01-10 "LinkChecker GUI" "LinkChecker GUI client"
.SH NAME
linkchecker-gui - GUI client to check links of websites and HTML documents
.
.SH SYNOPSIS
\fBlinkchecker-gui\fP
.
.SH DESCRIPTION
A graphical interface to check links of websites and HTML documents.
.SH "SEE ALSO"
\fBlinkchecker\fP(1)
.
.SH AUTHOR
Bastian Kleineidam <calvin@users.sourceforge.net>
.
.SH COPYRIGHT
Copyright \(co 2009 Bastian Kleineidam

View file

@ -7,7 +7,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2008-11-30 20:31+0100\n"
"POT-Creation-Date: 2009-01-11 01:15+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"
@ -40,7 +40,7 @@ msgid "LinkChecker commandline usage"
msgstr ""
# type: SH
#: en/linkchecker.1:2 en/linkcheckerrc.5:2
#: en/linkchecker.1:2 en/linkcheckerrc.5:2 en/linkchecker-gui.1:2
#, no-wrap
msgid "NAME"
msgstr ""
@ -51,7 +51,7 @@ msgid "linkchecker - check HTML documents and websites for broken links"
msgstr ""
# type: SH
#: en/linkchecker.1:5
#: en/linkchecker.1:5 en/linkchecker-gui.1:5
#, no-wrap
msgid "SYNOPSIS"
msgstr ""
@ -62,7 +62,7 @@ msgid "B<linkchecker> [I<options>] [I<file-or-url>]..."
msgstr ""
# type: SH
#: en/linkchecker.1:8 en/linkcheckerrc.5:5
#: en/linkchecker.1:8 en/linkcheckerrc.5:5 en/linkchecker-gui.1:8
#, no-wrap
msgid "DESCRIPTION"
msgstr ""
@ -1154,7 +1154,7 @@ msgid "B<http://www.amk.ca/python/howto/regex/> - regular expression documentati
msgstr ""
# type: SH
#: en/linkchecker.1:407 en/linkcheckerrc.5:417
#: en/linkchecker.1:407 en/linkcheckerrc.5:417 en/linkchecker-gui.1:11
#, no-wrap
msgid "SEE ALSO"
msgstr ""
@ -1165,18 +1165,18 @@ msgid "B<linkcheckerrc>(5)"
msgstr ""
# type: SH
#: en/linkchecker.1:410 en/linkcheckerrc.5:420
#: en/linkchecker.1:410 en/linkcheckerrc.5:420 en/linkchecker-gui.1:14
#, no-wrap
msgid "AUTHOR"
msgstr ""
# type: Plain text
#: en/linkchecker.1:412 en/linkcheckerrc.5:422
#: en/linkchecker.1:412 en/linkcheckerrc.5:422 en/linkchecker-gui.1:16
msgid "Bastian Kleineidam E<lt>calvin@users.sourceforge.netE<gt>"
msgstr ""
# type: SH
#: en/linkchecker.1:413 en/linkcheckerrc.5:423
#: en/linkchecker.1:413 en/linkcheckerrc.5:423 en/linkchecker-gui.1:17
#, no-wrap
msgid "COPYRIGHT"
msgstr ""
@ -2102,3 +2102,52 @@ msgstr ""
#: en/linkcheckerrc.5:419
msgid "linkchecker(1)"
msgstr ""
# type: TH
#: en/linkchecker-gui.1:1
#, no-wrap
msgid "LINKCHECKER-GUI"
msgstr ""
# type: TH
#: en/linkchecker-gui.1:1
#, no-wrap
msgid "2009-01-10"
msgstr ""
# type: TH
#: en/linkchecker-gui.1:1
#, no-wrap
msgid "LinkChecker GUI"
msgstr ""
# type: TH
#: en/linkchecker-gui.1:1
#, no-wrap
msgid "LinkChecker GUI client"
msgstr ""
# type: Plain text
#: en/linkchecker-gui.1:4
msgid "linkchecker-gui - GUI client to check links of websites and HTML documents"
msgstr ""
# type: Plain text
#: en/linkchecker-gui.1:7
msgid "B<linkchecker-gui>"
msgstr ""
# type: Plain text
#: en/linkchecker-gui.1:10
msgid "A graphical interface to check links of websites and HTML documents."
msgstr ""
# type: Plain text
#: en/linkchecker-gui.1:13
msgid "B<linkchecker>(1)"
msgstr ""
# type: Plain text
#: en/linkchecker-gui.1:18
msgid "Copyright \\(co 2009 Bastian Kleineidam"
msgstr ""

View file

@ -2,3 +2,4 @@
[po4a_paths] linkchecker.doc.pot $lang:$lang.po
[type: man] en/linkchecker.1 $lang:$lang/linkchecker.1
[type: man] en/linkcheckerrc.5 $lang:$lang/linkcheckerrc.5
[type: man] en/linkchecker-gui.1 $lang:$lang/linkchecker-gui.1

View file

@ -13,8 +13,5 @@ linkchecker_ui_%.py: ui/%.ui
linkchecker_rc.py: rc/linkchecker.qrc
pyrcc4 -o $@ $<
run:
env PYTHONPATH=.:.. python linkchecker-gui
clean:
rm -f *.pyc *.pyo

View file

@ -17,12 +17,11 @@
import os
from PyQt4 import QtCore, QtGui
from linkchecker_ui_main import Ui_MainWindow
from linkchecker_ui_options import Ui_Options
import linkcheck
from linkcheck import configuration, checker, director, add_intern_pattern, \
from .linkchecker_ui_main import Ui_MainWindow
from .linkchecker_ui_options import Ui_Options
from .. import configuration, checker, director, add_intern_pattern, \
strformat
from linkcheck.containers import enum
from ..containers import enum
Status = enum('idle', 'checking', 'stopping')

View file

Before

Width:  |  Height:  |  Size: 722 B

After

Width:  |  Height:  |  Size: 722 B

View file

Before

Width:  |  Height:  |  Size: 969 B

After

Width:  |  Height:  |  Size: 969 B

View file

Before

Width:  |  Height:  |  Size: 950 B

After

Width:  |  Height:  |  Size: 950 B

View file

Before

Width:  |  Height:  |  Size: 501 B

After

Width:  |  Height:  |  Size: 501 B

View file

Before

Width:  |  Height:  |  Size: 499 B

After

Width:  |  Height:  |  Size: 499 B

View file

@ -20,7 +20,7 @@ Check HTML pages for broken links. This is the GUI client.
"""
import sys
from PyQt4.QtGui import QApplication
from linkchecker_main import LinkCheckerMain
from linkcheck.gui import LinkCheckerMain
def main (argv=None):

View file

@ -174,6 +174,7 @@ class MyDistribution (distutils.core.Distribution, object):
def __init__ (self, attrs):
super(MyDistribution, self).__init__(attrs)
self.console = ['linkchecker']
self.windows = ['linkchecker-gui']
def run_commands (self):
"""Generate config file and run commands."""
@ -452,7 +453,7 @@ library_dirs = []
# libraries
libraries = []
# scripts
scripts = ['linkchecker']
scripts = ['linkchecker', 'linkchecker-gui']
if win_compiling:
scripts.append('install-linkchecker.py')
@ -489,9 +490,9 @@ data_files = [
]
if os.name == 'posix':
data_files.append(('share/man/man1', ['doc/en/linkchecker.1']))
data_files.append(('share/man/man1', ['doc/en/linkchecker.1', 'doc/en/linkchecker-gui.1']))
data_files.append(('share/man/man5', ['doc/en/linkcheckerrc.5']))
data_files.append(('share/man/de/man1', ['doc/de/linkchecker.1']))
data_files.append(('share/man/de/man1', ['doc/de/linkchecker.1', 'doc/de/linkchecker-gui.1']))
data_files.append(('share/man/de/man5', ['doc/de/linkcheckerrc.5']))
data_files.append(('share/linkchecker/examples',
['config/linkchecker-completion',
@ -515,7 +516,7 @@ elif win_compiling:
setup (
name = "linkchecker",
version = "4.10",
version = "5.0",
description = "check websites and HTML documents for broken links",
keywords = "link,url,checking,verification",
author = myname,
@ -556,7 +557,7 @@ o a (Fast)CGI web interface (requires HTTP server)
'linkcheck.director', 'linkcheck.configuration', 'linkcheck.cache',
'linkcheck.htmlutil', 'linkcheck.dns', 'linkcheck.dns.rdtypes',
'linkcheck.dns.rdtypes.ANY', 'linkcheck.dns.rdtypes.IN',
'linkcheck.HtmlParser', 'linkcheck.network',
'linkcheck.HtmlParser', 'linkcheck.network', 'linkcheck.gui',
],
ext_modules = [
Extension('linkcheck.HtmlParser.htmlsax',