HTML Files

Fairlight fairlite at fairlite.com
Wed Oct 20 13:22:20 PDT 2004


Four score and seven years--eh, screw that!
At about Wed, Oct 20, 2004 at 03:48:46PM -0400,
William James McEachran blabbed on about:
> I've been meaning to ask this for some time ...
> what's the advantages of using the various built in html commands?

You get to learn YAUML (Yet Another Useless Markup Language).

> I sat down once to learn them and quickly became befuddle, confused, and
> impatient. I went back to using export or writeline (with jsfile).
> 
> So, what are the advantages of using the html commands?

AFAICT, it's a waste of internal code, and there aren't really advantages
unless you're doing HTML in the middle of reports--and I've heard of people
making their own HTML print code table, so even then it's pointless.

My -own- solution is drastically different:

1) Design your HTML (including JS or whatever you need) in the
editor/design-tool of your choice, be it vi, FrontPage, HotDog Pro, or
whatever your heart desires.

2) Run my html2prcout program:
   html2prcout -i /path/to/somefile.html -o /path/to/filepro/table/myout.html

3) Edit in any variable concatenations and logic you need for any dynamic
   sections.  This is usually quite minimal.

4) CALL "myout" from whatever table needs to do the output.

That's it.  You design it in whatever, tweak it slightly to do the dynamic
bits, and it's a fully callable table that writes to whatever path is
specified in the global variable OutFile in the calling table.

The defined table is even commented.  A snipped-for-length example is as
follows:

:'Generated by Fairlight html2prcout v00.00.03:'Season the following table to taste.:
:':'Generated on Wed Oct 20 16:06:11 2004:
:':':
::declare extern OutFile 'Pass output location in this variable.:
::declare extern ErrOut 'Check open return with this variable.:
::declare Pre,Msg,OHandle(4,.0):
::OHandle=open(OutFile,"wc0t"):
:OHandle lt "0":ErrOut = "FAIL";return:
::ErrOut = "PASS":
:':'***** Beginning of embedded HTML *****:
::Msg="<html>":
::gosub sendln:
::Msg="<head>":
::gosub sendln:
::Msg="<title>Fairlight OneGate Documentation</title>":
::gosub sendln:
::Msg="<link rel=\"stylesheet\" href=\"onegatedocs.css\" type=\"text/css\">":
::gosub sendln:
::Msg="</head>":
::gosub sendln:
::Msg="<body>":
::gosub sendln:
::Msg="<center>":
::gosub sendln:
::Msg="<img alt=\"Fairlight OneGate\" src=\"onegate.gif\">":
::gosub sendln:
::Msg="<hr>":
     [SNIP MIDDLE REST OF LARGE DOCUMENT -- YADDA YADDA]
::Msg="</body>":
::gosub sendln:
::Msg="</html>":
::gosub sendln:
:':'***** End of embedded HTML *****:
::end:
sendln:Pre ne "":Pre=Pre&chr("10");ln=write(OHandle,Pre,len(Pre)):
:Msg ne "":Msg=Msg&chr("10");ln=write(OHandle,Msg,len(Msg)):
::Msg="";Pre="":
::return:

This thing totally takes the PITA-ness out of getting LOTS of HTML into fP.
No learning--just do what you would for any HTML creation job elsewhere and
convert it to a callable processing table--one that's even *cabe-friendly
with line-lengths. 

I've not publicly released html2prcout previously, but I'd sell it to
anyone that's interested.  I'll even compile it (it's perl, actually) for
'doze systems.  Any sane *nix system should have a relatively modern perl5
now--even SCO.  Interested parties can contact me offlist.

mark->
-- 
Bring the web-enabling power of OneGate to -your- filePro applications today!

Try the live filePro-based, OneGate-enabled demo at the following URL:
               http://www2.onnik.com/~fairlite/flfssindex.html


More information about the Filepro-list mailing list