Home > Archive > Fortran > March 2006 > is there as simple way to drive html with fortran ?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
is there as simple way to drive html with fortran ?
|
|
| Philippe Lehert 2006-03-28, 7:02 pm |
| Dear All,
We, statisticians appreciate Fortran for calculation, however,
displaying nice tables is difficult. HTML does it perfectly, thus the
best is to calculate with fortran and displaying in preparing HTML
output. How to do it simple ?
Using CVF 6.6, one of the examples (iweb) uses com interface with
shdocvw.dll to drive Internet browser, I send html from my program and
it nicely displays on a separate web-window. However, problems arise:
How is it possible to modify the window title? to add menus in the
browser ? to change focus ? more generally, how is it possible to
modify parameters of the browser from fortran program ? I found in SDK
, the IwebBrowser routines (a module is provided for fortran in
CVF6.6), but, i never found possibility to change titles, to put
browser on top.
My questions are :
a) Is this IWEB system the best way for driving HTML output From
fortran ? if Yes, How can I do for a better control of the Webwindow
such as window title, focus, etc...
b) If there is a more SIMPLE method than IWEB for driving HTML from
fortran?
c) I still hesitate to migrate to Intel Visual Fortran from CVF6.6. The
main reason is that this monstruous .NET system required to use IVF.
Did IVF provide additional simple tools (compared with CVF) for
managing HTML outputs ?
Thanks so much for this answer.
With Best Regards,
Professor Ph Lehert
Faculty of Economics, Fucam
Academy of Louvain
United Nations Consulting Statistician
| |
| beliavsky@aol.com 2006-03-28, 7:02 pm |
| Philippe Lehert wrote:
> Dear All,
>
> We, statisticians appreciate Fortran for calculation, however,
> displaying nice tables is difficult. HTML does it perfectly, thus the
> best is to calculate with fortran and displaying in preparing HTML
> output. How to do it simple ?
One approach is to write output text files from Fortran and then use a
scripting language such as Python and Perl to create HTML. I'm sure a
good Perl porgrammer could get the desired results faster than I could
in Fortran. I think libraries already exist in these languages for such
tasks. I would try to avoid being locked in to the CVF/IVF line of
compilers and Windows OS.
The free, cross-platform R statistics package can read tabular data
files and produce nice graphics in PostScript. There exist utilities to
convert from PostScript to html.
| |
| N. Shamsundar 2006-03-28, 7:02 pm |
| Philippe Lehert wrote:
> Dear All,
>
> We, statisticians appreciate Fortran for calculation, however,
> displaying nice tables is difficult. HTML does it perfectly, thus the
> best is to calculate with fortran and displaying in preparing HTML
> output. How to do it simple ?
>
> Using CVF 6.6, one of the examples (iweb) uses com interface with
> shdocvw.dll to drive Internet browser, I send html from my program and
> it nicely displays on a separate web-window. However, problems arise:
> How is it possible to modify the window title? to add menus in the
> browser ? to change focus ? more generally, how is it possible to
> modify parameters of the browser from fortran program ? I found in SDK
> , the IwebBrowser routines (a module is provided for fortran in
> CVF6.6), but, i never found possibility to change titles, to put
> browser on top.
>
> My questions are :
>
> a) Is this IWEB system the best way for driving HTML output From
> fortran ? if Yes, How can I do for a better control of the Webwindow
> such as window title, focus, etc...
>
> b) If there is a more SIMPLE method than IWEB for driving HTML from
> fortran?
>
> c) I still hesitate to migrate to Intel Visual Fortran from CVF6.6. The
> main reason is that this monstruous .NET system required to use IVF.
> Did IVF provide additional simple tools (compared with CVF) for
> managing HTML outputs ?
>
>
> Thanks so much for this answer.
> With Best Regards,
>
>
> Professor Ph Lehert
> Faculty of Economics, Fucam
> Academy of Louvain
> United Nations Consulting Statistician
>
The more tightly one integrates a Fortran (or C, etc.) program producing
output and display technologies such as HTML, Postscript, etc., the
less adaptable the resulting system will be. HTML is fine for display on
screen. Postscript or PDF is much better for printed output.
If static HTML will be enough for your needs, here is a very simple,
modular, technique that you can use. (i) Prepare a dummy HTML file in
the format that you like -- titles, fonts, table format, etc., can all
be done the way you want -- using one of the numerous HTML editors that
are available. (ii) Then, use that file as a template to convert your
Fortran program output to HTML. The conversion could be done using a
Fortran subroutine, or an external program or script. You could also
output HTML markup AND output data directly in Fortran, but that would
not be advisable since one loses flexibility as a result.
N. Shamsundar
University of Houston
| |
| e p chandler 2006-03-28, 7:02 pm |
|
Philippe Lehert wrote:
> Dear All,
>
> We, statisticians appreciate Fortran for calculation, however,
> displaying nice tables is difficult. HTML does it perfectly, thus the
> best is to calculate with fortran and displaying in preparing HTML
> output. How to do it simple ?
>
> Using CVF 6.6, one of the examples (iweb) uses com interface with
> shdocvw.dll to drive Internet browser, I send html from my program and
> it nicely displays on a separate web-window. However, problems arise:
> How is it possible to modify the window title? to add menus in the
> browser ? to change focus ? more generally, how is it possible to
> modify parameters of the browser from fortran program ? I found in SDK
> , the IwebBrowser routines (a module is provided for fortran in
> CVF6.6), but, i never found possibility to change titles, to put
> browser on top.
Modify the HTML that your program generates to control the browser. For
example add a TITLE tag to the HEAD section. Other effects are usually
done by embedding programs in a scripting language such as Javascript
in the web page.
Why not execute a command line such as "start foo.html" via CALL
SYSTEM()?
One feature (or bug!) on Windows is that if you write a .hta file
instead of .htm or .html then you get a plain window without the
browser buttons or controls AND some of the security constraints are
relaxed.
As others have said, merging an HTML template with data is often done
in a text scripting language such as Perl, Python, AWK, etc.
-- Elliot
| |
| Anton Haumer 2006-03-28, 7:02 pm |
| Philippe Lehert schrieb:
>
> Dear All,
>
> We, statisticians appreciate Fortran for calculation, however,
> displaying nice tables is difficult. HTML does it perfectly, thus the
> best is to calculate with fortran and displaying in preparing HTML
> output. How to do it simple ?
>
> Using CVF 6.6, one of the examples (iweb) uses com interface with
> shdocvw.dll to drive Internet browser, I send html from my program and
> it nicely displays on a separate web-window. However, problems arise:
> How is it possible to modify the window title? to add menus in the
> browser ? to change focus ? more generally, how is it possible to
> modify parameters of the browser from fortran program ? I found in SDK
> , the IwebBrowser routines (a module is provided for fortran in
> CVF6.6), but, i never found possibility to change titles, to put
> browser on top.
>
> My questions are :
>
> a) Is this IWEB system the best way for driving HTML output From
> fortran ? if Yes, How can I do for a better control of the Webwindow
> such as window title, focus, etc...
>
> b) If there is a more SIMPLE method than IWEB for driving HTML from
> fortran?
>
> c) I still hesitate to migrate to Intel Visual Fortran from CVF6.6. The
> main reason is that this monstruous .NET system required to use IVF.
> Did IVF provide additional simple tools (compared with CVF) for
> managing HTML outputs ?
>
> Thanks so much for this answer.
> With Best Regards,
>
> Professor Ph Lehert
> Faculty of Economics, Fucam
> Academy of Louvain
> United Nations Consulting Statistician
One idea is to use a standard XML parser
and write XML data with FORTRAN,
transforming the XML data afterwards to HTML
with XSL stylesheets.
Best regards,
Toni H.
| |
| Joe Krahn 2006-03-28, 7:02 pm |
| Philippe Lehert wrote:
> Dear All,
>
> We, statisticians appreciate Fortran for calculation, however,
> displaying nice tables is difficult. HTML does it perfectly, thus the
> best is to calculate with fortran and displaying in preparing HTML
> output. How to do it simple ?
>
> Using CVF 6.6, one of the examples (iweb) uses com interface with
> shdocvw.dll to drive Internet browser, I send html from my program and
> it nicely displays on a separate web-window. However, problems arise:
> How is it possible to modify the window title? to add menus in the
> browser ? to change focus ? more generally, how is it possible to
> modify parameters of the browser from fortran program ? I found in SDK
> , the IwebBrowser routines (a module is provided for fortran in
> CVF6.6), but, i never found possibility to change titles, to put
> browser on top.
>
> My questions are :
>
> a) Is this IWEB system the best way for driving HTML output From
> fortran ? if Yes, How can I do for a better control of the Webwindow
> such as window title, focus, etc...
>
> b) If there is a more SIMPLE method than IWEB for driving HTML from
> fortran?
>
> c) I still hesitate to migrate to Intel Visual Fortran from CVF6.6. The
> main reason is that this monstruous .NET system required to use IVF.
> Did IVF provide additional simple tools (compared with CVF) for
> managing HTML outputs ?
>
>
> Thanks so much for this answer.
> With Best Regards,
>
>
> Professor Ph Lehert
> Faculty of Economics, Fucam
> Academy of Louvain
> United Nations Consulting Statistician
>
Static HTML pages are just plain text, so are not a problem to create in
Fortran, especially by starting from a text file made from an editor.
However, it seems like you want to use HTML dynamically. Web browsers
are designed to be user controlled, not controlled by an application. It
sounds like you are using some Microsoft method of using Internet
Explorer as a passive display. If so, it is not portable and means
getting pulled into the huge .NET monstrosity.
If you want a display dynamically controlled by a program, HTML is
really not a good approach.
The best way to get good advice is to explain a bit more about what you
are trying to accomplish rather thant just asking about specific
programming tools.
Joe
|
|
|
|
|