source: trunk/tutorial3/merge.tcl @ 932

Last change on this file since 932 was 932, checked in by toby, 16 years ago

address missing files

File size: 1.8 KB
Line 
1set filelist {
2    index.html alumina1.html  alumina2.html alumina3.html alumina4.html
3    alumina5.html alumina6.html alumina7.html alumina8.html alumina9.html
4    alumina10.html alumina11.html}
5
6set out [open merged.html w]
7puts $out {
8<html>
9<head>
10   <title>GSAS/EXPGUI Alumina Tutorial Intro</title>
11</head>
12
13<style>
14A:link {text-decoration:none}
15A:vlink {text-decoration:none}
16</style>
17
18<BODY BGCOLOR="#FFFFFF"
19      topmargin="0" leftmargin="0" marginwidth="0" marginheight="0" 
20      text="#000000" link="#0033ff" vlink="#0033ff" alink="#0033ff">
21
22<? 
23   include("/var/www/include/navigation.inc");
24   include("/var/www/include/utility.inc"); 
25?>
26}
27
28foreach file $filelist {
29    set in [open $file r]
30    puts $out "<a name=\"$file\">"
31    while {[string match -nocase *<center>* [set line [gets $in]]] != 1} {}
32    puts $out $line
33    while {[string match -nocase *<hr>* [set line [gets $in]]] != 1} {
34        regsub {(<A HREF=")(alumina)} $line {\1#\2} line
35        if {[regexp -nocase {(.*<img.*)(src=\")(.*gif)(\")(.*)} $line a b c d e f] != 0} {
36            set size [exec gifinfo $d]
37            regexp {([0-9]+)x([0-9]+)} $size a width height
38            puts "gif = $d $width $height"
39            puts $out [concat $b$c$d$e "width=[expr $width/2] height=[expr $height/2]" $f]
40        } else {
41          puts $out $line
42        }
43    }
44    close $in
45}
46puts $out {
47<HR>
48This concludes this tutorial exercise. This has been a simple problem, in
49that the coordinates have few degrees of freedom and the refinement is
50quite stable, but it should illustrate many of the steps to be followed in
51most Rietveld fits.
52<P><font size=-1><A HREF="MAILTO:crystal@NIST.gov?subject=WWW page <?=$PHP_SELF?>">Comments, corrections or questions: crystal@NIST.gov</A></font><BR>
53<font size=-1><? lastmod(); ?> </font>
54</body>
55</html>
56}
57close $out
Note: See TracBrowser for help on using the repository browser.