Merging data into HTML files

12 views
Skip to first unread message

Gavin Holt

unread,
Nov 10, 2010, 6:50:12 AM11/10/10
to Idealist
My copy of Idealist (I32) has been moved from machine to machine
following me around for more years than I care to remember. It is not
a full RDBMS, nor is it an ideal programming environment, however it
is rock solid and out performs any other system for the tasks it can
undertake. In this age of firewalls and managed privileges it is a joy
to carry a truly portable application offering so much power with such
a small footprint.

I have explored merging data into HTML files with great success and
would like to share this with you all. I have one HTML document per
record type and simply add the record type label as the first line of
the file (e.g. :HipReplacement). Within the HTML document fields are
inserted within {}, which most WYSIWYG HTML editors will simply
ignore. Where there are parent records the data from the parent can be
accessed in the normal way with {Age from Parent}. Using a field in
the record to store the name of this HTML file we can write a toolbar
script so each record can be merged with the correct document, saved
and then viewed in a browser:-

Stage one: Use the export function to generate a CMD file -
MakeHTML.exp:-

:Hip
CDDatabase()
export(1,,,"exp\\\\{OpExp}","out\\\\{PatLastName}
_{PatFirstName}.html",0)
run("PRUN.EXE out\\\\{PatLastName}_{PatFirstName}.html")

Stage two: Run the generated CMD file - MakeHTML.cmd:-

CDDatabase()
export(1,,,"exp\\HipReplacement.htm","out\\Holt_Gavin.html",0)
run("PRUN.EXE out\\Holt_Gavin.html")

Toolbar script: To kick it all off

Comfort()
CDDatabase()
CD(cmd)
Quiet(1)
Export(1,,,"MakeHTML.exp","MakeHTML.cmd",0)
Quiet(0)
FileCommand("MakeHTML.cmd")

As you will see there is a considerable amount of "working around"
required to get past the limitations of Idealist, however it is very
gratifying when it works! (Please excuse the \\\\ but I like to keep
the files in separate directories, one for CMD, EXPort, OUTput etc.)

Gavin.Holt

P.S. I would very much like to view the source code for I32 in order
to understand how it parses the macro commands, substitution of field
contents appears to be variable from one function to another. It would
also be very helpful to have access to the "field expressions" in the
macro CMD scripts. This aspiration may the spur I need to learn C++.

Christopher Hurrey

unread,
Nov 12, 2010, 11:06:09 AM11/12/10
to ideal...@googlegroups.com
Gavin
 
I too have run Idealist 3.1 on everything from Windows 3.1 to Windows 7 with no trouble at all. Thanks for the HTML advice. I have created XML output files from Idealist using export format files with the fields enclosed with XML type punctuation. No formatting information of course but I guess you can use XSL etc for that.
 
I have the source code for I32.exe. It was sent to me some years ago by the guys at Bekon. I recompiled bits of the code to create a slightly more secure version: no acess to function keys and commands like 'delete' renamed to something
obscure; ALT+F10 changed to a more unusual combination to prevent users from entering commands directly. I am no prgrammer - certainly not in C++ - but I used a version of Microsoft's C++ compiler and it seemed to work. While it won't cope with dialogue boxes etc it will change functionality. The spellchecker does not work on my unofficial version.
 
I have been trying to track down the original developer but have had no luck. Bekon seems to have gone out of business. I met the guys there a couple of times but it was clear that had no real handle on the development issues.
 
So I have no idea who owns the IPR to the software now.
 
You are welcome to the code - but bear in mind the unsure IPR situation.
 
Chris
--
Chris Hurrey
tel    07969 907193

Reply all
Reply to author
Forward
0 new messages