🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: bit.listserv.script-l
1 messages
1 total messages Started by Michael Friendly Wed, 23 Nov 1994 15:42
Re: DCF does HTML?
#305
Author: 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
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads