%!ps % errsrch1.psl % Searches a group of files for a character string. % Intended to find obscure web link errors. % =========================================================== % by Don Lancaster % Copyright c 2009 and earlier by Don Lancaster and Synergetics, Box 809, % Thatcher Arizona, 5552 (928) 428-4073 don@tinaja.com support % via http://www.tinaja.com All commercial rights and all electronic % media rights **FULLY** reserved. Reposting is expressly forbidden. % IMPORTANT NOTE: Don Lancaster's file gonzo.ps is optional for this program. % After obvious location mods, uncomment ONE of the following two lines: (C:\\gonzo2\\gonzo.ps)run % use internal gonzo % use internal gonzo % (A:\\gonzo.ps) run % use external gonzo % NOTE THAT ALL PS FILENAME STRINGS !!!DEMAND!!! DOUBLE REVERSE SLASHES. % Gonzo is available as http://www.tinaja.com/post01.asp#gonzo with a % tutorial at http://www.tinaja.com/glib/gonzotut.pdf % presently finds only the first occurance of the error string in each subgoupr % of curstring characters %%%%%%%%%%%%% % This utility scans a host based /filelist for occurances of /phraselist and % reports results to a logfile. It can be used with a logfile error reporter % to try and find link errors. % An excerpt from the Gonzo Utilities.... % mergestr merges the two top stack strings into one top stack string /mergestr {2 copy length exch length add string dup dup 4 3 roll 4 index length exch putinterval 3 1 roll exch 0 exch putinterval} def %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% /diskfileheader (C:\\Documents and Settings\\don\\Desktop\\aanewsand\\) store /curstring 62000 string store /group1 [ % from the list in holdlist.txt aa (aa whtnu01\\whtnu10.asp) (aa whtnu01\\whtnu09.asp) (aa whtnu01\\whtnu08.asp) (aa whtnu01\\whtnu07.asp) (aa whtnu01\\whtnu06.asp) (aa whtnu01\\whtnu05.asp) (aa whtnu01\\whtnu04.asp) (aa whtnu01\\whtnu03.asp) (aa whtnu01\\whtnu02.asp) (aa whtnu01\\whtnu01.asp) (aa whtnu01\\whtnu00.asp) (aa whtnu01\\whtnu99.asp) (aa whtnu01\\whtnu98.asp) (aa whtnu01\\whtnu97.asp) (magsn01\\magsn01.asp) (post01\\post01.asp) (cubic01\\cubic01.asp) (h2gas01\\h2gas01.asp) (auct01\\auct01.asp) (acrob01\\acrob01.asp) (magsn01\\demo28a.asp) (bargains\\barg01.asp) (gilahike\\gilahike.asp) (patnt01\\patnt01.asp) (amlink01\\amlink01.asp) (info01\\info01.asp) (picup01\\picup01.asp) (resbn01\\resbn01.asp) (tinaja01\\tinaja01.asp) (navicube\\navcub01.asp) (hack01\\hack01.asp) (muse01\\muse01.asp) (aafont01\\aafont01.asp) (blat01\\blat01.asp) (map01\\map01.asp) (gurgrm01\\gurgrm01.asp) (eeweb01\\eeweb01.asp) (glair01\\glair01.asp) (pseudo01\\pseudo01.asp) (libry01\\libry01.asp) (santa01\\santa01.asp) (adept01\\adeptinv.asp) (third01\\third01.asp) (auct01\\aucres01.asp) (flut01\\flut01.asp) (bod01\\bod01.asp) (advt01\\advt01.asp) (wave01\\wave01.asp) (synlib01\\synlib01.asp) (home01\\default.asp) (consul01\\consul01.asp) % (site01\\site01.asp) huh missing (bitmap old\\bmfont01.asp) (ismm01\\ismm01.asp) % (other01\\other01.asp) huh missing (weblib01\\weblib01.asp) (capvid01\\capvid01.asp) (math01\\math01.asp) (beewb01\\beewb01.asp) (golly01\\golly01.asp) (home01\\bcsamp1.asp) (home01\\pasamp1.asp) (home01\\ebsamp1.asp) (home01\\tmsamp1.asp) (home01\\blsamp1.asp) (home01\\bksamp1.asp) (home01\\hhsamp1.asp) (home01\\ansamp1.asp) (home01\\lasamp1.asp) (home01\\bosamp1.asp) (home01\\spsamp1.asp) (home01\\orsamp1.asp) (home01\\lbsamp1.asp) (home01\\crsamp1.asp) (home01\\pssamp1.asp) (home01\\etsamp1.asp) (home01\\rbsamp1.asp) % (mscal28Q.asp) ] store /errlist1 [ (.pdf.pdf) (.htnl) (/glib/msquantpsl) % these are from a recentl 404 log report (/glib/muse113.pdf.pdf) (/glib/msns2401.pdf) (/glib/msnp2401.pdf) (/glib/resbn87.pdf.pdf) (/text/newslink.htnl) (/\(null\)) (/glib/bookmark.pdf) (/psutils/dpat76.psl) (/glib/hack69.pdf) (/gurgrm01asp) (/glib/hack76.pdf) (/glib/hack71.pdf) (/psutils/weberru2.ps) (/glurgrm01.asp) (/tinaja_index/glib/muse95.pdf) (/glib/nrglect.pdf) (/glib/trashelc.pdf>) (/www.metafilter.com) (/text/insecure.htnl) ] store /errlist2 [ % (whtnu06.asp) % (whtnu04.asp) % (/glib01.asp) (index.php) (glib/index.php) (glib01.asp) (psutils/pdfflash.psl) (sitemap.xml) (\(null\)) (video.google.com.com/) (www.tinaja.com/amlink01.html) (glib/stepsynt.psl) (magsn01.asp.com) (glib/archpers.psl/index.php) (gilahike01.asp) (glib/invegraf.psl/index.php) (psulils/deltapat.psl) (emergop7.asp) (glib/tramshow.psl) (books/bkpstnt.asp) (errors.php) (glib/errors.php) (glib/auct01.pdf) (glib/energyfun.pdf) ] store /errlist3 [ (blat02x) ] store /curgroup group1 store % set current selection to be scanned /curerr errlist3 store % set current selection for errors to be found /lookforerrors { curgroup { diskfileheader exch mergestr /filenametoscan exch store (\n\nScanning file) filenametoscan mergestr print flush scanonefile } forall } store /scanonefile { curerr { filenametoscan (r) file /curfile exch store scanoneerr curfile closefile} forall } store /scanoneerr {/curerrname exch store (\n sf ) curerrname mergestr ( ) mergestr print flush {curfile curstring readstring % for all earlier strings not{exit}if scanonestring } loop scanonestring % for final short string } store /scanonestring { curerrname search { (\n GOTONE just before ) print flush pop pop ==} { (.) print flush pop} ifelse } store %%%%%%%%%%%%%%%%%% demo - remove or alter before reuse stopwatchon lookforerrors (\n\n\n) print flush stopwatchoff (\n\n\n) print flush % EOF