%!ps % fixwhtnumenus1 attempts to repair whtnu menues % ======= % Author and date % Function % Details % ====== % Postscript demo to generate css compatible menu tables. % Intended primarily for study as this was an internal workfile. % Requires gonzo, gonzotut, and several older files relocated. % Requires //acrodist /F from command line. % Cut and paste .txt generated code from chrome, not wordpad. % ======= % Uncomment and modify to use disk based Gonzo. ( or other disk access ) (C:/Users/Don/Desktop/Ghost/gonzo.psl) run % use internal /guru { gonzo begin ps.util.1 begin printerror nuisance begin} def guru % activate gonzo utilities % ============================== /fileprefix (C:/Users/don/Desktop/web/new_whtnu11_618/) store /infilename (whtnu11a.shtml) store /outfilename (whtnu11newmenusa.shtml) store /startarray [ ] store /endarray [ ] store /ststr () store fileprefix infilename mergestr (r) file /nf exch store fileprefix outfilename mergestr (w) file /nfd exch store %%% findstart stashes the start and end filepositions for each header to be substituted /findstart { /endfile false store 2000000 { /endfile false store nf 17 string readstring { (
December 27, 2015 deeplink   top   bot   respond
) pop %%%%%%%%%%%%%%%%%%%%%%% % warning: "13" is live loaded below! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% /oktocontinue { pop pop 0 8 getinterval /sixhit exch store (\n\nnamesearch is now ---> ) print sixhit == sixhit 0 2 getinterval /month exch store month == sixhit 3 2 getinterval /day exch store day == sixhit 6 2 getinterval /year exch store year == /newid ( id="d) sixhit mergestr (") mergestr store newid == /newlink (#d)sixhit mergestr store newlink == /fulldate month cvi 1 sub monthnames exch get ( ) mergestr day mergestr (, 20) mergestr year mergestr ( ) mergestr store fulldate == } store /newmenu { (
\n) mergestr (\n\n\n
) mergestr fulldate mergestr (deeplink   top   bot   respond
) mergestr } store %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% /changeolddata { (now changing old data) print olddata (name="d) search {oktocontinue}{(did_not_find_name="d.) print} ifelse } store %%%%%%%%%%%%%%%%%%%%%%%%% % file writing demo fileprefix infilename mergestr (r) file /nf exch store fileprefix outfilename mergestr (w) file /nfd exch store stopwatchon nf 300 string readstring == print nf 0 setfileposition % write up to first startarray 0 get 14 sub string nf exch readstring % up to first table { nfd exch writestring}{pop exit} ifelse (\n\n============================ first write done |n|n) == 0 1 endarray length 2 sub {/curpos exch store nf startarray curpos get 2 add setfileposition 500 string nf exch readstring { }{} ifelse /olddata exch store (\n\n\n\nonepass\n\n) == olddata print % temp changeolddata nfd newmenu writestring nf endarray curpos get setfileposition nf startarray curpos 1 add get endarray curpos get sub string readstring { nfd exch writestring}{pop exit} ifelse } for stopwatchoff { nf endarray length 1 sub get % last url startarray length 1 sub get sub string readstring { nfd exch writestring}{pop exit} ifelse } pop nf 10000 string readstring {(\n\nnot yet ended!\n\n)== }{ nfd exch writestring } ifelse % past last url stopwatchoff nfd closefile (\n\n) print (\n\n) print %EOF