Subject: | |
From: | |
Reply To: | |
Date: | Mon, 9 Dec 1996 00:08:00 +0100 |
Content-Type: | multipart/mixed |
Parts/Attachments: |
|
|
I noticed the <PRE> prefixing trick in a recent posting...
Just keep in mind, that special characters like "<" and ">"
and "&" can still cause some trouble inside the remaining
text passages... so it might be a good idea to replace them
by < and > and & tokens.
Find a little command file for text-to-html conversion (not
too fancy) attached. Using it on spoolfiles with CCTL might
not yield nice results. Using CHANGEQ 1/1 TO "" IN ALL in
the EDITOR might be added to get rid of column. (Of course,
parsing the CCTL and creating appropriate linefeeds would
yield a nicer result in many situtations).
Lars.
parm filename, entry=""
comment convert plain textfile to simple html format, lars 30.06.94
if "!entry" = "" then
setvar myself "!-1"
!myself ;entry="phase1" > edtcmds
!myself ;entry="phase2" < edtcmds
!myself ;entry="phase3" > edtcmds
!myself ;entry="phase4" < edtcmds
deletevar myself
endif
if "!entry" = "phase1" then
echo set variable
echo exit
endif
if "!entry" = "phase2" then
file edttext=!filename
run editor.pub.sys,basicentry
reset edttext
endif
if "!entry" = "phase3" then
echo changeq "&" to "&" in all
echo changeq "<" to "<" in all
echo changeq ">" to ">" in all
echo add .1
echo !<title!>No Title!</title!>
echo !<h1!>No Heading!</h1!>
echo !<address!>No author!</address!>!<p!>
echo !<pre!>
echo //
echo add
echo !</pre!>
echo //
echo exit
endif
if "!entry" = "phase4" then
file edttext=!filename
run editor.pub.sys,basicentry
reset edttext
endif
|
|
|