Commit 7b02fc54 by kollo

version 1.16

parent c0b01702
......@@ -35,12 +35,12 @@ endif
next i
return
procedure char(x,y,c)
local i,j
for i=0 to 15
for j=0 to 7
if btst(peek(varptr(f$)+c+i*256),7-j)=0
pbox x+j*scale,y+i*scale,x+j*scale+scale,y+i*scale+scale-1
local i,j
for i=0 to 15
for j=0 to 7
if btst(peek(varptr(f$)+c+i*256),7-j)=0
pbox x+j*scale,y+i*scale,x+j*scale+scale,y+i*scale+scale-1
endif
next j
next i
next j
next i
return
......@@ -14,7 +14,7 @@ arrayfill h(),0
h(0)=1 ! Das Ende Zeichen
count=0
gh=0
f$="huffman.bas"
f$="text.txt"
if exist(f$)
open "I",#1,f$
content$=input$(#1,lof(#1))
......@@ -93,6 +93,7 @@ print "};"
' Jetzt die codierung
seek #1,0
kod$=""
kodcount=0
for j=0 to l-1
a=peek(varptr(content$)+j) and 0xff
for i=0 to count-1
......@@ -100,7 +101,8 @@ for j=0 to l-1
kod$=kod$+t$(255-i)
while len(kod$)>=8
kkk$=left$(kod$,8)
print kkk$;" ";
@output(kkk$)
inc kodcount
kod$=right$(kod$,len(kod$)-8)
wend
exit if true
......@@ -114,9 +116,10 @@ a=0
for i=0 to count-1
if a(255-i)=a
kod$=kod$+t$(255-i)
while len(kod$)>=8
while len(kod$)
kkk$=left$(kod$,8)
print kkk$;" ";
@output(kkk$)
inc kodcount
kod$=right$(kod$,len(kod$)-8)
wend
exit if true
......@@ -125,15 +128,29 @@ a=0
if i=count
print "ERROR"
endif
print kod$
print "New Size: ";len(kod$)/8
print "Compression: ";len(kod$)/8/lof(#1)
print "Compression: ";len(kod$)/lof(#1);" Bits pro Zeichen. Soll:";log(count)/log(2)
print "New Size: ";kodcount
print "Compression: ";kodcount/lof(#1)
print "Compression: ";8*kodcount/lof(#1);" Bits pro Zeichen. Soll:";log(count)/log(2)
close
quit
procedure output(b$)
local i
local a
a=0
for i=0 to 7
if peek(varptr(b$)+i)-asc("0")=1
a=bset(a,i)
else
endif
next i
print "0x";hex$(a,2,2);", ";
flush
return
procedure doit(sta,sto)
local oo,x1,x2,i,hh,gh
x1=sta
......
......@@ -2147,7 +2147,7 @@ procedure hoehenprofil
print #11,"set y2label "+chr$(34)+"Geschwindigkeit [km/h]"+chr$(34)
print #11,"set origin 0,0"
print #11,"set size 1,0.5"
print #11,"plot [:][-10:3000] "+chr$(34)+dattmp$+chr$(34)+" u ($2/1000):4 t ";
print #11,"plot [:][-10:200] "+chr$(34)+dattmp$+chr$(34)+" u ($2/1000):4 t ";
print #11,chr$(34)+"Hoehe"+chr$(34)+" w steps , ";
print #11,chr$(34)+dattmp$+chr$(34)+" u ($2/1000):($5) t ";
print #11,chr$(34)+"Geschwindigkeit"+chr$(34)+" w steps"
......
' output of inline.bas for X11-Basic 07.12.2010
' /export/TomTom/INTERNAL/SDKRegistry/xearth.bmp 9270 Bytes. (compressed: 2803 Bytes, 30%)
xearth$=""
xearth$=xearth$+"`S*^-SPY<I3$AEIR&&_[)]'.A]M=IODDY\=L'LQ/*bSJR?]UM\=IF(5B1N<^+).*"
xearth$=xearth$+"1ZTCMM,<b-`=WIWT:$/YPIVB:Bb,`K>W-:0NE\V[`_6JEMI(N`cI/1PY(>0>G`[="
xearth$=xearth$+"ZJ1$6:A=$1E1UUWNQM*4$W+X>_VB?RV+L])1@',7GHP<@9c9V%F:&C22<KU(c),W"
xearth$=xearth$+"P1VE/=FR%S,75Y`c-O7?AT+@+G<P-OQM`\O06?`H:]H:aGHJ3.2Zb2_7$S2;(1=:"
xearth$=xearth$+"Rb)6_)E;1AHK1;2\$R8A?c/KW0P1V+%X_c<3]C:3WJ9\'RS+$BccM_$I'NYHR0SN"
xearth$=xearth$+":\U=:&`HA.b1VC/+`QJMIKTN6CYD]F*,./JXS>XEB-II0CKRb@B`H-'4W/=:OPI+"
xearth$=xearth$+"_.+C\*F/8U@&33%$?C>%6*D(C*,S1PP)HE&C:P.K:E1/>`32./+:(/)6TZY+<B9/"
xearth$=xearth$+"SQ>bbM:0/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7;Z0K5ZN'%-^GV45\9K*XP\WQ?`a5`>KAWLI9)'K-.$(T97c=F"
xearth$=xearth$+":AB5]1D3%BP[E@=FR,%[VK5)Z-8?:`S<0..OF[NCK:=_MY?FES$'1YU&<A%D'.S>"
xearth$=xearth$+"^J,+,Db1\ZI/&,G^GPU^)UC]4A16CJ;5G.FL@$>3**56G9\9(VG0?HPR`-OIL3A9"
xearth$=xearth$+"/1RAa]JF_F(9[.NU'-)9,5b6:M77..B\EB@%MZSRJ1b8,c\S%NG`O-P`=Z2K@FDJ"
xearth$=xearth$+"%BRE]B&S^4L+5L)YaZ**NP[335*6a3R1LB`W^62U&Y4;PHFC@A;'LE5^YJ--SN_$"
xearth$=xearth$+"\);;U=YU4-71E/&0$6XL_``56$]EQ-b?*B>:V^TX0OE+\:62:G?]YXEUVJcTbY+-"
xearth$=xearth$+"9$=Nb=<?E*`2'-RW10I8T5,GRO+_/N8*T`<YS%J.%-Pb59.PXLC3GT`&D;Q9>F4["
xearth$=xearth$+"-WI($RZU3G2$*)NA[L5%Q*&+`$NB%1Y/&:@(+BEQH4S,H\@+;_6C$:YQ]B4X,LK<"
xearth$=xearth$+"'3^ERXM<]=*[Z&aFH`T\B;/1S7J4B`N3KS+R'??LI2@-BXW=cZ8<E+4I&TcD$A0`"
xearth$=xearth$+"IK/8E\1XVW'1*01,aU3P,)-AG`M%6XCX1^%+Z7NMC*;E4I=NDZ_L5BWJ46@YV2Q-"
xearth$=xearth$+"S/QAVIN[Q@C.C0=K\4YZ->G-RTLTYQP9O51@^ZaF-]D11FO@I<KO(5\4/==EQLJ;"
xearth$=xearth$+"<'S/I^9U4$Z(Z.=R0POC]-@(&$$$"
xearth_bmp$=UNCOMPRESS$(INLINE$(xearth$))
clearw
put 100,100,xearth_bmp$
vsync
~inp(-2)
quit
' Mandelbrotfraktale (c) Markus Hoffmann
bx=0
by=0
bw=256
bh=256
sx=-2.2
sy=-1.7
sw=3.4
sh=3.4
sizew ,bw,bh
clearw
t=timer
for x=bx to bx+bw
for y=by to by+bh
gx=(x-bx)/bw*sw+sx
gy=(y-by)/bh*sh+sy
zx=gx
zy=gy
for c=0 to 255
nzx=zx^2-zy^2+gx
zy=2*zx*zy+gy
zx=nzx
exit if zx^2+zy^2>4
next c
color c*256+c*64
plot x,y
next y
vsync
next x
print timer-t;" Sekunden."
quit
data "Benchmark fot the virtual machine by Markus Hoffmann 2010"
' savescreen Test for X11-basic (c) Markus hoffmann 2008
'
'
' In the framebuffer-version (TomTom etc) the file format is
' .bmp 24 Bit
'
for i=0 to 32
for j=0 to 20
circle i*20,j*20,8
if odd(j+i)
pcircle i*20,j*20,3
endif
next j
next i
circle 100,100,30
circle 200,200,60
pcircle 200,300,70
a$=system$("locate .bmp")
while len(a$)
wort_sep a$,chr$(10),0,t$,a$
if exist(t$)
open "I",#1,t$
t$=input$(#1,lof(#1))
put 0,0,t$
close
vsync
pause 1
endif
wend
quit
' Test der Shared_memory Funktinen
shmid=shm_malloc(32,12345)
print "SHMID:"'shmid
adr=shm_attach(shmid)
print "ADR:"'hex$(adr)
' Show all *.bmp images (X11-Basic)
if len(param$(2))
t$=mkd$(val(param$(2)))
bmove varptr(t$),adr,len(t$)
' shm_free shmid
else
weiss=get_color(65535,65535,65535)
grau=get_color(65535/1.2,65535/1.2,65535/1.2)
schwarz=get_color(0,0,0)
rot=get_color(65535,0,0)
groesse=0.7
offset=22
faktor=1000
SIZEW ,800*groesse+200,200*groesse+200
t$=system$("locate .bmp")
plot 1,1
vsync
COLOR schwarz
PBOX 0,0,800*groesse+200,200*groesse+200
t$=space$(32)
'if peek(adr)=200
do
bmove adr,varptr(t$),32
aa=a
a=cvd(t$)
if a<>aa
@display(a)
endif
'endif
't$=chr$(200)+" Hallo, ich bins "+time$
'bmove varptr(t$),adr,len(t$)
'system "ipcs"
'pause 5
'shm_detach adr
'system "ipcs"
'pause 5
exit if a=4711
pause 1
loop
shm_free shmid
endif
weiss=get_color(65525,65525,65535)
while len(t$)
wort_sep t$,chr$(10),0,a$,t$
if exist(a$)
open "I",#1,a$
g$=input$(#1,lof(#1))
color 0
color get_color(65525,30000,0)
pbox 0,0,640,400
put 0,0,g$
color weiss
text 100,100,a$
vsync
print a$
keyevent
close
vsync
endif
wend
quit
procedure display(wert)
COLOR schwarz
PBOX 20,92,800*groesse+200,200*groesse+200
COLOR weiss
DEFLINE ,25*groesse,2
DEFTEXT 1,groesse,2*groesse
LTEXT 500-LTEXTLEN(STR$(wert)),100,STR$(wert)
VSYNC
return
' Test of the SORT function (c) Markus Hoffmann 2010
' works only with version 1.16
'
n=1000000
dim t$(n)
dim u%(n)
for i=0 to n-1
t$(i)=str$(random(n))
u%(i)=i
next i
print "los."
t=timer
sort t$(),n,u%()
t1=timer-t
for i=0 to 20
print i,t$(i),u%(i)
next i
print "Zeit: ";t1;" Sek."
t=timer
sort u%(),n
t2=timer-t
for i=0 to 20
print i,t$(i),u%(i)
next i
print "Zeit: ";t2;" Sek."
quit
defline ,80
color get_color(54424,0,0)
line 100,100,99,200
line 200,200,199,100
for i=0 to 360 step 30
color get_color(65535,65535,0)
line 400,400,400+200*cos(i/180*pi),400+200*sin(i/180*pi)
vsync
pause 0.1
color 0
' line 400,400,400+200*cos(i/180*pi),400+200*sin(i/180*pi)
' pause 0.01
next i
pause 1
quit
' Zeichnet einen Uebersichtgrapf aus den Zugriffdaten der Webseiten.
' (C) Markus Hoffmann 2010
'
' dot a.grf -Teps -oa.eps
'
' neato a.grf -Goverlap=false -Gsplines=true -Teps -oa.eps
'
clr count
dim line$(100000)
dim gravity(100000)
arrayfill gravity(),0
inputfile$="/var/log/apache2/access_log"
outputfilename$="a.grf"
i=1
WHILE LEN(param$(i))
IF LEFT$(param$(i))="-"
IF param$(i)="--help" OR param$(i)="-h"
@intro
@using
ELSE IF param$(i)="--version"
@intro
QUIT
ELSE IF param$(i)="-o"
INC i
IF LEN(param$(i))
outputfilename$=param$(i)
ENDIF
else
collect$=collect$+param$(i)+" "
ENDIF
ELSE
inputfile$=param$(i)
IF NOT EXIST(inputfile$)
PRINT "ana: "+inputfile$+": file or path not found"
CLR inputfile$
ENDIF
ENDIF
INC i
WEND
IF LEN(inputfile$)
open "O",#2,outputfilename$
@doit(inputfile$)
close #2
else
print "ana: No input files"
endif
quit
PROCEDURE intro
PRINT "Graphical WEB-Statistics V.1.15 (c) Markus Hoffmann 2005-2010"
VERSION
RETURN
PROCEDURE using
PRINT "Usage: ana [options] file..."
PRINT "Options:"
PRINT " -h, --help Display this information"
PRINT " -o <file> Place the output into <file>"
RETURN
procedure doit(f$)
local incount
local outcount
incount=0
outcount=0
open "I",#1,f$
print #2,"digraph all {"
print #2," "+chr$(34)+"/"+chr$(34)+" [shape=box,color=red];"
print #2," "+chr$(34)+"/wiki/"+chr$(34)+" [shape=box,color=red];"
print #2," UPLOAD [shape=box,color=blue];"
print #2," SEARCH [shape=box,color=red];"
print #2," MOVE [shape=box,color=red];"
print #2," WANTED [shape=box,color=green];"
print #2," LOGIN [shape=box,color=red];"
print #2," LOGOUT [shape=box,color=red];"
print #2," CHANGES [shape=box,color=red];"
print #2," TIMETABLE_INPUT [shape=box,color=green];"
print #2," Main_Page [color=red];"
print #2," Sandbox [color=green];"
print #2," "+chr$(34)+"timetable-visits.cgi"+chr$(34)+" [fontcolor=red];"
print #2," "+chr$(34)+"timetable.cgi"+chr$(34)+" [fontcolor=red];"
print #2," "+chr$(34)+"BRABBEL"+chr$(34)+" [fontcolor=red];"
print #2," CONTRIBUTION [shape=box,color=green];"
' print #2," ALLPAGES [shape=box,color=green];"
while not eof(#1)
lineinput #1,t$
inc incount
if not glob(t$,"*onobook*") and not glob(t$,"*/common/*") and not \
glob(t$,"*/thumb/*") and not glob(t$,"*.css&*") and not \
glob(t$,"*/graphviz/*") and not glob(t$,"*/images/*") and not \
glob(t$,"*opensearch_desc.php*") and not glob(t$,"*/LLRF-Logo-klein.png*") and not \
glob(t$,"*/9mA-plots/*") and not glob(t$,"*/favicon.ico*") and not \
glob(t$,"*.js&*") and not glob(t$,"*POST *") and not glob(t$,"*/wiki/index.php?action=ajax*") and not \
glob(t$,"*/api.php*")
' and left$(t$,12)="131.169.132."
split t$," ",0,a$,t$
ip$=a$
split t$," ",0,a$,t$
split t$," ",0,a$,t$
split t$," ",0,a$,t$
split t$," ",0,a$,t$
split t$," ",0,a$,t$
a$=replace$(a$,"GET /wiki/index.php/","")
a$=replace$(a$,"GET /wiki/index.php?title=","")
a$=replace$(a$,"GET /cgi-bin/","")
a$=replace$(a$," HTTP/1.1","")
a$=replace$(a$,"GET ","")
a$=@repl_common$(a$)
split t$," ",0,b$,t$
split t$," ",0,b$,t$
split t$," ",0,b$,t$
b$=@repl_common$(b$)
@patmatch("*&diff=*","[label="+chr$(34)+"diff"+chr$(34)+",fontcolor=orange]")
@patmatch("*S:Whatlinkshere*","[label="+chr$(34)+"link"+chr$(34)+",fontcolor=blue]")
@patmatch("*PAGES*","[shape=box,fontcolor=blue,color=green]")
@patmatch("*&printable=yes*","[label="+chr$(34)+"print"+chr$(34)+",fontcolor=blue]")
@patmatch("*->history*","[label="+chr$(34)+"history"+chr$(34)+",fontcolor=green]")
@patmatch("*->submit*","[label="+chr$(34)+"submit"+chr$(34)+",fontcolor=blue]")
@patmatch("*->edit*","[label="+chr$(34)+"edit"+chr$(34)+",fontcolor=green]")
@patmatch("*->delete*","[label="+chr$(34)+"delete"+chr$(34)+",fontcolor=red]")
@patmatch("*/selfhtml/*.gif*","[label="+chr$(34)+".gif"+chr$(34)+"]")
@patmatch("*.css*","[label="+chr$(34)+".css"+chr$(34)+"]")
@patmatch("SPEECH","[shape=box,fontcolor=red]")
@patmatch("BOOK","[shape=box,color=blue]")
@patmatch("COLLECTION","[shape=box,color=green]")
if b$=chr$(34)+"-"+chr$(34)
print #2,chr$(34)+"-"+ip$+"-"+chr$(34);" [shape=box, color=red, label="+chr$(34)+ip$+chr$(34)+"];"
print #2,chr$(34)+"-"+ip$+"-"+chr$(34);" -> ";a$;" ;"
else if glob(b$,"*http://*")
print #2,b$+" [shape=box, color=blue, fontcolor=red];"
@addline(b$+" -> "+a$)
else
@addline(b$+" -> "+a$)
endif
inc outcount
endif
wend
if count>0
last$=""
for i=0 to count-1
if line$(i)<>last$
if gravity(i)>1
print #2,line$(i)+" [style=bold,weight="+str$(gravity(i))+",label="+str$(gravity(i))+"] ;"
else
print #2,line$(i)+" ;"
endif
last$=line$(i)
endif
next i
endif
'print #2,"overlap=scale"
'print #2,"size=10"
print #2,"fontname="+chr$(34)+"Arial"+chr$(34)+";"
print #2,"graph [fontname="+chr$(34)+"Arial"+chr$(34)+"];"
print #2,"concentrate=true;"
print #2,"label="+chr$(34)+f$+"\n produced with X11-Basic and graphviz "+date$+" "+time$+chr$(34)+";"
print #2,"}"
close #1
print incount;" -> ";outcount
return
procedure patmatch(mpat$,mmatch$)
if glob(a$,mpat$) or glob(b$,mpat$)
if glob(a$,mpat$)
print #2,a$+" "+mmatch$+" ;"
else if glob(b$,mpat$)
print #2,b$+" "+mmatch$+" ;"
endif
print "p";
flush
inc outcount
endif
return
procedure addline(lll$)
local i
if count>0
for i=0 to count-1
if line$(i)=lll$
gravity(i)=gravity(i)+1
return
endif
next i
line$(count)=lll$
gravity(count)=1
print ".";
inc count
flush
else
line$(count)=lll$
gravity(count)=1
inc count
print ".";
flush
endif
return
function repl_common$(in$)
oo$=in$
oo$=replace$(oo$,"mskpc14.desy.de","mskpc14")
oo$=replace$(oo$,"msk.desy.de","msk")
oo$=replace$(oo$,"localhost:8080","mskpc14")
oo$=replace$(oo$,"%2F","/")
oo$=replace$(oo$,"http://mskpc14/wiki/index.php?title=","")
oo$=replace$(oo$,"http://mskpc14/wiki/index.php/","")
oo$=replace$(oo$,"http://mskpc14/cgi-bin/","")
oo$=replace$(oo$,"http://mskpc14/","/")
oo$=replace$(oo$,"http://msk/","m:/")
oo$=replace$(oo$,"%3A",":")
oo$=replace$(oo$,"%40","@")
oo$=replace$(oo$,"%27","'")
oo$=replace$(oo$,"%20","-")
oo$=replace$(oo$,"&action=","->")
oo$=replace$(oo$,"?action=","->")
oo$=replace$(oo$,"&oldid=","|")
oo$=replace$(oo$,"&section=","#")
oo$=replace$(oo$,"&redirect=no","")
oo$=replace$(oo$,"&go=Go","")
oo$=replace$(oo$,"&feed=atom","")
oo$=replace$(oo$,"&feed=rss","")
oo$=replace$(oo$,"&from=Mskpc14","")
oo$=replace$(oo$,"&from=","@")
oo$=replace$(oo$,"&prefix=","!")
oo$=replace$(oo$,"&go=Seite","")
oo$=replace$(oo$,"&direction=next","")
oo$=replace$(oo$,"&hidemyself=1","")
oo$=replace$(oo$,"/2007/02","")
oo$=replace$(oo$,"&namespace=0","")
oo$=replace$(oo$,"->raw&","->raw")
oo$=replace$(oo$,"Special:Whatlinkshere/","L:")
if left$(oo$,15)=chr$(34)+"Special:Search"
oo$="SEARCH"
else if left$(oo$,15)=chr$(34)+"Special:Upload"
oo$="UPLOAD"
else if left$(oo$,14)=chr$(34)+"Special:Book/"
oo$="BOOK"
else if left$(oo$,28)=chr$(34)+"/wiki/extensions/Collection"
oo$="COLLECTION"
else if glob(oo$,"*eingabemaske.cgi?*")
oo$="TIMETABLE_INPUT"
else if glob(oo$,"*mandel.cgi?*")
oo$="MANDEL"
else if glob(oo$,"*brabbel.cgi?*")
oo$="BRABBEL"
else if glob(oo$,"*sprachserver.cgi?*")
oo$="SPEECH"
else if glob(oo$,"*mandelgif.cgi?*")
oo$="MANDELGIF"
else if glob(oo$,"*mandelposter.cgi?*")
oo$="MANDELPOSTER"
else if glob(oo$,"*Special:Movepage*")
oo$="MOVE"
else if glob(oo$,"*Special:Wantedpage*")
oo$="WANTED"
else if glob(oo$,"*Special:Userlogin*")
oo$="LOGIN"
else if glob(oo$,"*Special:Lonelypag*")
oo$="LONELYPAGES"
else if glob(oo$,"*Special:Userlogou*")
oo$="LOGOUT"
else if glob(oo$,"*Special:Contribut*")
oo$="CONTRIBUTION"
else if glob(oo$,"*Special:Allpages*")
oo$="ALLPAGES"
else if glob(oo$,"*Special:Recentchanges*")
oo$="CHANGES"
else if glob(oo$,"*/ana_poster/a.png.*")
oo$=chr$(34)+".png"+chr$(34)
else if glob(oo$,"*/ana_poster/*/a.png.*")
oo$=chr$(34)+".png"+chr$(34)
endif
oo$=replace$(oo$,"Special:","S:")
oo$=replace$(oo$,"Image:","I:")
oo$=replace$(oo$,"User:","U:")
oo$=replace$(oo$,"/Files/","F:")
return oo$
endfunction
open "I",#1,"spat-a.fnt"
print "const unsigned char fontdata816[]={"
for j=0 to 255
print " ";
for i=0 to 15
a=inp(#1)
print "0x";hex$(a,2,2,1);
if j<>255 or i<>15
print ",";
endif
next i
print " /*";j;"*/"
next j
print "};"
close
quit
......@@ -2,13 +2,15 @@
' This program creates a html-File and thumbnail-pictures of all
' *.jpg, *.gif and *.png files
' (c) Markus Hoffmann 2003
' (c) Markus Hoffmann 2003-2010
'
' Revision 1 ??-2003
' Revision 3 07-2005
' Revision 4 11-2005
' Revision 5 12-2005
' Revision 6 12-2006
' Revision 7 11-2009 (convert angepasst)
' Revision 8 02-2010 README Dateien in Header, wenn vorhanden
tmpfile$="fotoweb"+str$(timer)
......@@ -31,7 +33,7 @@ while len(tmp$)
endif
wend
tmp$=system$("ls *.jpg *.JPG *.gif *.png *.eps *.fig *.bmp *.avi *.AVI")
tmp$=system$("ls *.jpg *.JPG *.gif *.png *.eps *.fig *.bmp *.avi *.AVI *.mpg *.MPG")
if len(tmp$)<2
print "No pictures found"
quit
......@@ -40,7 +42,16 @@ endif
open "O",#2,"fotoweb.html"
print #2,"<HTML> <HEAD> <TITLE>fotoweb V.1.03 (c) Markus Hoffmann</TITLE></HEAD>"
print #2,"<BODY bgcolor="+chr$(34)+"#ffffff"+chr$(34)+" link=2200aa vlink=008800>"
print #2,"<center><h1>MH picture galery</h1></center>"
' README einbinden, wenn vorhanden
if exist("README")
open "I",#33,"README"
rm$=input$(#33,lof(#33))
close #33
print #2,rm$
else
print #2,"<center><h1>MH picture galery</h1></center>"
endif
print #2,"<h5>"+env$("PWD")+"</h5>"
if len(ordner$)
print #2,"<h2>Subfolders:</h2><ul>"+ordner$+"</ul><p>"
......@@ -73,7 +84,10 @@ while len(tmp$)
system "convert -fill black -colors 64 +dither -comment 'fotoweb V.1.03' -geometry x76 -draw 'text 0,10 "+chr$(34)+"%m:%wx%h"+chr$(34)+"' -fill red -font x:fixed -draw 'text 0,74 "+chr$(34)+"oooooooooooooo"+chr$(34)+"' -border 2x2 "+chr$(34)+"y-0.ppm"+chr$(34)+" "+chr$(34)+"thumbs/"+t$+".png"+chr$(34)
system "rm -f y-0.ppm"
else
system "convert -fill black -colors 64 +dither -comment 'fotoweb V.1.03' -geometry x76 -draw 'text 0,10 "+chr$(34)+"%m:%wx%h"+chr$(34)+"' -fill red -font x:fixed -draw 'text 0,74 "+chr$(34)+"%f"+chr$(34)+"' -border 2x2 "+chr$(34)+t$+chr$(34)+" "+chr$(34)+"thumbs/"+t$+".png"+chr$(34)
info1$=system$("echo `identify -format "+chr$(34)+"%f"+chr$(34)+" "+chr$(34)+t$+chr$(34)+"`")
info2$=system$("echo `identify -format "+chr$(34)+"%m:%wx%h"+chr$(34)+" "+chr$(34)+t$+chr$(34)+"`")
system "echo `identify -format "+chr$(34)+"%m:Name: %f, %b Bytes, %wx%h"+chr$(34)+" "+chr$(34)+t$+chr$(34)+"`"
system "convert -fill black -colors 64 +dither -comment 'fotoweb V.1.03' -geometry x76 -draw 'text 0,10 "+chr$(34)+info2$+chr$(34)+"' -fill red -font x:fixed -draw 'text 0,74 "+chr$(34)+info1$+chr$(34)+"' -border 2x2 "+chr$(34)+t$+chr$(34)+" "+chr$(34)+"thumbs/"+t$+".png"+chr$(34)
endif
system "chmod 644 "+chr$(34)+"thumbs/"+t$+".png"+chr$(34)
print "T";
......
File mode changed from 100755 to 100644
......@@ -6,7 +6,10 @@
' the defaults
w=320
w=480 ! Large screen
h=272
w=320 ! small screen
h=240
idepth=16
depth=24
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment