]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/make_website
4b1a9aaf4af78dc71d7c794217f209853b73948f
[lilypond.git] / Documentation / make_website
1 #!/usr/bin/perl -w
2 sub
3         set_hrefs
4 {
5     while (<HTMLIN>) {
6         s#href=([A-Za-z.]+)#href=$base/$1#g;
7         print HTMLOUT $_;
8     }
9 }
10
11 local $base="lilypond/";
12 local @examples=("wohltemperirt");
13
14 system  'make html';
15
16 print "resetting refs.\n";
17
18 foreach $a (<*.html>)
19 {
20     rename $a, "$a~";
21     open HTMLIN, "$a~";
22     open HTMLOUT, ">$a";
23     set_hrefs;
24 }
25
26 foreach $a (@examples) {
27     $texfile="test";
28     system "cd ..; lilypond input/$a; tex $texfile;";
29     system "dvips -o $texfile.ps $texfile;";    
30     system "mv ../$texfile.ps $a.ps;".
31         "gs -q -sDEVICE=ppmraw -sOutputFile=- -r200 -dNOPAUSE  $a.ps -c quit |pnmscale 0.5| ppmtogif > $a.gif"
32 }
33
34 system "mkdir docxx; make -C.. docxx; ln ../docxx/* ./docxx/;"
35
36 system "tar cf website.tar *.html *.gif *.png *.ps docxx/;" .
37 "gzip -9 website.tar;"