1 | set 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 | |
---|
6 | set out [open merged.html w] |
---|
7 | puts $out { |
---|
8 | <html> |
---|
9 | <head> |
---|
10 | <title>GSAS/EXPGUI Alumina Tutorial Intro</title> |
---|
11 | </head> |
---|
12 | |
---|
13 | <style> |
---|
14 | A:link {text-decoration:none} |
---|
15 | A: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 | |
---|
28 | foreach 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 | } |
---|
46 | puts $out { |
---|
47 | <HR> |
---|
48 | This concludes this tutorial exercise. This has been a simple problem, in |
---|
49 | that the coordinates have few degrees of freedom and the refinement is |
---|
50 | quite stable, but it should illustrate many of the steps to be followed in |
---|
51 | most 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 | } |
---|
57 | close $out |
---|