🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: bit.listserv.script-l
Article #305

Re: DCF does HTML?

#305
From: Michael Friendly
Date: Wed, 23 Nov 1994 15:42
134 lines
4782 bytes
I too have been wondering about converting (Waterloo) script documents
to html.  I played with rexx/xedit programs to do the translation,
until I realized that the translation involved two separate
aspects: parsing and substitution, and that all the parsing was
present in Script itself, and the substitution could be done by
simply modifying bits of the Script files which handle tags.

I haven't gotten very far, but this scheme is workable.  Here,
for example, is a modification of GML$BASE.  In use, I have a file
GML$HTML SCRIPT.  In the file to be converted, I change
.im gmlgdoc
to
.im gml$html
and processing by script does the conversion.
A rexx interface could handle renaming the output file to ftype=html,
etc.

+======================================== Beginning of GML$HTML SCRIPT
.im HML$base
.im HML$h
.im HML$list
-============================================== End of GML$HTML SCRIPT
+======================================== Beginning of HML$BASE SCRIPT
.* HML$base -- from GML$base for HTML                           90/04/30
.**********************************************************************.
.* ----------------------------------------------------------------- CIT
..dm @cit begin
<cite>
&*
..dm @cit end
.* ---------------------------------------------------------------- ECIT
..dm @ecit begin
</cite>
..if &L'&* eq 0
.    ..th ..ct
.'   ..'el ..'ct ..li 1;&V'&*
..dm @ecit end
.* ------------------------------------------------------------------- P
..sr @p@sk = 1
..dm @para begin
..sk &@p@sk a c
<p>
&*
..dm @para end
.* ----------------------------------------------------------------- HPn
..sr @@hplev   OFF;..sr @@hplev()   = -1
..sr @@hpital  OFF;..sr @@hpital()  = NO
..sr @@hpbold  OFF;..sr @@hpbold()  = NO
..sr @@hpup    OFF;..sr @@hpup()    = NO
..sr @@hpwhere OFF;..sr @@hpwhere() = 'start of GML processing'
..dm @hp begin
..if &*ITALIC eq YES ..th <it>
..if &*BOLD   eq YES ..th <bd>
..up &*UPPER
..sr @@hplev()  = &*_TAG(3:3)
..sr @@hpital() = &*ITALIC
..sr @@hpbold() = &*BOLD
..sr @@hpup()   = &*UPPER
..bf &*FONT =
..if &L'&* eq 0
.    ..th ..ct
.'   ..'el ..li 1;&V'&*
..me ..sr @@hpwhere() = &V'&@@where
..dm @hp end
.* ---------------------------------------------------------------- eHPn
..dm @ehp begin
..sr *i = &@@hplev(0)
..if &@@hplev(&*i) ne &*_TAG(4:4) ..go error
..pf
..sr *i = &*i - 1
..sr @@hplev(0)   = &*i
..sr @@hpital(0)  = &*i
..sr @@hpbold(0)  = &*i
..sr @@hpup(0)    = &*i
..sr @@hpwhere(0) = &*i
..up &@@hpup(&*i)
..if &L'&* eq 0
.    ..th ..ct
.'   ..'el ..'ct ..li 1;&V'&*
..if &@@hpbold(&*i) NO ..th </bd>
..if &@@hpital(&*i) NO ..th </it>
..me
...error ..sr *level = &@@hplev(&*i)
..if &*level gt -1
.'   ..'th .'@@error &*_TAG preceded by HP&*level
.'   ..'el .'@@error &*_TAG not preceded by &*_TAG(2:4)
..dm @ehp end
.* ------------------------------------------------------------------ LQ
..dm @lq begin
..sk &@lq@sk a c
<blockquote>
..li 1;&V'&*
..dm @lq end
.* ----------------------------------------------------------------- eLQ
..dm @elq begin
..li 1;&V'&*
</blockquote>
..sk &@lq@sk a c
..dm @elq end
.* ----------------------------------------------------------------- XMP
..dm @xmp begin
..sr @xmp@sk = &*SK
..sk &*SK a c
..sr @xplace = &*PLACE
..if &*PLACE eq ANY ..go EPLACE
..if &@@BEGIN eq nil ..do;..cc begin;..sr @@BEGIN = XMP;..do end
...EPLACE
<pre>
..sa;..in &*IN+&SYSIN+&SYSOF *
..ls &@gml@ss;..co
&*ALIGN
..bf &*FONT =
..sp &*DEPTH;&*
..dm @xmp end
.* ---------------------------------------------------------------- EXMP
..dm @exmp begin
..br;..re
..if &@xplace eq ANY ..go EPLACE
..if &@@BEGIN eq XMP ..do;..cc end;..sr @@BEGIN = nil;..do end
...EPLACE
..pf
</pre>
..sk &@xmp@sk a c;..sk &@gml@ls a c;&*
..dm @exmp end
.* ---------------------------------------------------------------- NOTE
..dm @note begin
<p>
<strong>&*name.:
</strong>
..'if &L'&* gt 0 ..li 1;&V'&*
..dm @note end
.* --------------------------------------------------------------- ENOTE
.* no change
-============================================== End of HML$BASE SCRIPT
Technical Details
Message-ID: <SCRIPT-L%94112314533574@UGA.CC.UGA.EDU>
Path: arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!howland.reston.ans.net!paladin.american.edu!auvm!VM1.YORKU.CA!FRIENDLY

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11353d,59b90d156c0e6814
X-Google-Attributes: gid11353d,public
X-Google-ArrivalTime: 1994-11-23 15:01:40 PST
Path: arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!howland.reston.ans.net!paladin.american.edu!auvm!VM1.YORKU.CA!FRIENDLY
Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
Newsgroups: bit.listserv.script-l
Message-ID: <SCRIPT-L%94112314533574@UGA.CC.UGA.EDU>
Date: Wed, 23 Nov 1994 10:42:41 EST
Sender: IBM vs Waterloo SCRIPT discussion group <SCRIPT-L@UGA.BITNET>
From: Michael Friendly <FRIENDLY@VM1.YORKU.CA>
Subject: Re: DCF does HTML?
Lines: 133