git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@104 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
calvin 2000-06-11 00:13:54 +00:00
parent f82ecca558
commit 987175487a
6 changed files with 165 additions and 16 deletions

19
INSTALL
View file

@ -13,18 +13,19 @@ on Windows!
Install with Distutils:
This is the preferred way to install because its the easy way.
If you have the Distutils, run "python setup.py install".
The Distutils package has a lot of install options to tweak and ease
your installation.
To install LinkChecker run "python setup.py install".
Debian users can build the .deb package with "debian/rules binary".
Install without Distutils:
Adjust the sys.path.append argument in the file 'linkchecker' to point
to the distribution directory.
Copy 'linkcheck/__init__.py.tmpl' to 'linkcheck/__init__.py' and
replace $install_data with the distribution directory.
Windows users copy 'linkchecker.bat.tmpl' to 'linkchecker.bat' and
replace $install_scripts with the distribution directory.
After all, put the distribution directory in your path.
Execute "python install.py" to install LinkChecker in the distribution
directory.
To use HTTPS, compile the Pyhton module ssl.c, for example with
"gcc -c -I/usr/include/openssl -I/usr/include/python1.5 -g -O2 -fPIC \
ssl.c -o ssl.o"
Put the distribution directory in your path to execute the linkchecker
script from everywhere.
Running LinkChecker:

View file

@ -56,5 +56,6 @@ def checkUrls(config = Config.Configuration()):
except KeyboardInterrupt:
config.finish()
config.log_endOfOutput()
sys.exit(1) # XXX this is not good(tm)
raise
config.log_endOfOutput()

View file

@ -1,6 +1,6 @@
@echo off
rem if you want to have german output uncomment the next line
rem set LC_MESSAGES=de
rem uncomment the next line to enable german output
rem set LC_MESSAGES=de
rem Limited to 9 parameters? Is there a * for Windows?
python "$path_to_linkchecker\linkchecker" %1 %2 %3 %4 %5 %6 %7 %8 %9
python "/home/calvin/projects/linkchecker\linkchecker" %1 %2 %3 %4 %5 %6 %7 %8 %9

View file

@ -1,4 +1,4 @@
#!/usr/bin/python -O
#!/usr/bin/python
import sys
@ -8,7 +8,7 @@ if sys.version[:5] < "1.5.2":
sys.exit(1)
# add the path to linkcheck module if you do not install with distutils
sys.path.append("/home/calvin/projects/linkchecker")
$syspath
import getopt,re,string,os
import linkcheck,StringUtil
from linkcheck import _
@ -146,6 +146,7 @@ try:
"password=",
"quiet",
"recursion-level=",
"wischiwaschi",
"robots-txt",
"strict",
"threads=",
@ -264,7 +265,11 @@ for opt,arg in options:
elif opt=="-v" or opt=="--verbose":
config["verbose"] = 1
config["warnings"] = 1
elif opt="--wischiwaschi":
import util1
util1.w()
exit(0)
elif opt=="-w" or opt=="--warnings":
config["warnings"] = 1

View file

@ -76,6 +76,10 @@ class LCDistribution(Distribution):
f = open("linkcheck/__init__.py","w")
f.write(t.fill_in({"install_data": inst.install_data}))
f.close()
t = Template.Template("linkchecker.tmpl")
f = open("linkchecker","w")
f.write(t.fill_in({"syspath": "# sys.path augmentation not needed"}))
f.close()
if os.name=='nt':
t = Template("linkchecker.bat.tmpl")
f = open("linkchecker.bat","w")

138
util1.py Normal file
View file

@ -0,0 +1,138 @@
import curses,sys,time,rotor,types
_bs = [
['\023\335\233\203\2323\016',
'\023\335\233\215\324\244\016',
'\023\335v\215.\244\377K',
'\023\245\304\304.\205\027\2730',
'\023\335\377{\232\207\372K'],
['\023\335\233q\005\016\016',
'\023\335\233\215\324\244\016',
'\023\335v\215.\244\377K',
'\023\245\304\304.\205\027\2730',
'\023\335\377{\232\207\372K'],
['\023\335\233J\232\233\016',
'\023\335\233\215\324\244\016',
'\023\335v\215.\244\377K',
'\023\245\304\304.\205\027\2730',
'\023\335\377{\232\207\372K']]
_ss = [
['\023\335\340\275\247\205',
'\023\335v\347\216\205',
'\023\245\304\304\363\244\016',
'\023\303\377J\005\354\016'],
['\023\335\340\275\247\205',
'\023\335v\370\216\205',
'\023\245\304\304\363\244\016',
'\023\303\377J\005\354\016'],
['\023\335\340\305\330\205',
'\023\335v\347\216\205',
'\023\245\304\304\363\244\016',
'\023\303\377J\005\354\016']]
_1 = '\001\347k\304}\203\265(Y\261\357\220\240lL\026\377\234lz\362w\372\015)\366\232p\267\220nL\3238%\343\310\362\037\331\022\355r\334\237$\203w\037C:^\240_\2351\217'
_2 = '\035\177\271uC\203\016\306h\2016OHT\352Gw\3770\202fl\013S\021\016\370'
_3 = '\236\177\246\304\351F\203(\005z\375\220\324)\201\266z*j\342\344l\323\0325\374:Z\313\212hD\256\334?a\034\274\315\004r\012a\334\237$\203w\037'
_4 = '\222\360P\277\330\300\246\3670\256\303\223\036\311['
def abbuzze():
w = curses.initscr() # initialize the curses library
curses.nonl() # tell curses not to do NL->CR/NL on output
curses.noecho() # don't echo input
curses.cbreak() # take input chars one at a time, no wait for \n
curses.meta(1) # allow 8-bit chars
my,mx = w.getmaxyx()
b = w.subwin(my-2, mx, 0, 0)
s = w.subwin(my-2, 0)
bs = nassmache(_bs)
ss = nassmache(_ss)
allahopp(s, nassmache(_1))
tadaaa(b, ss[0])
allahopp(s, nassmache(_2))
wischi(b, ss)
allahopp(s, nassmache(_3))
tadaaa(b, bs[0])
waschi(b, bs)
allahopp(s, nassmache(_4))
abspann(curses.newwin(8, 30, 0, 0))
w.erase()
w.refresh()
curses.endwin()
def waddemol(f):
time.sleep(float(f))
def nassmache(henne):
if type(henne) == types.StringType:
return rotor.newrotor('ramdoesiger Malaker').decrypt(henne)
hase = []
for ei in henne:
hase.append(nassmache(ei))
return hase
def allahopp(w, s, y=2):
w.erase()
w.move(0,y)
for i in range(len(s)):
w.addch(ord(s[i]))
waddemol(0.14)
w.refresh()
waddemol(0.7)
def tadaaa(w, l):
w.erase()
my,mx = w.getmaxyx()
for p in range(mx/2):
hotzenplotz(w, my/3, p, l)
w.refresh()
waddemol(0.15)
def hotzenplotz(w,y,x,l):
for li in l:
w.addstr(y, x, li)
y = y+1
def wischi(w, ls):
my,mx = w.getmaxyx()
f = 0.2
i=0
j=0
up = 1
w.erase()
while i<11:
i = i+1
j = j + (up and 1 or -1)
if j==-1: up = 1
elif j==1: up = 0
hotzenplotz(w,my/3,mx/2+j,ls[j+1])
w.refresh()
waddemol(f)
def waschi(w, l):
wischi(w,l)
def abspann(w):
w.erase()
w.border()
w.refresh()
w1 = w.subwin(1, 20, 3, 4)
w2 = w.subwin(1, 20, 5, 4)
allahopp(w1, "Tux wishy washy", 0)
allahopp(w1, "Author:", 0)
allahopp(w2, "Bastian Kleineidam", 0)
allahopp(w1, "Featuring:", 0)
allahopp(w2, "Little Tux", 0)
allahopp(w2, "Big Tux", 0)
waddemol(1)
if __name__=='__main__':
try:
abbuzze()
except:
curses.endwin()
type, value = sys.exc_info()[:2]
print type,value
print "Sorry, your washing machine is broken!"