]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/make_website
partial: 0.0.39-1.jcn
[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  'pod2html';
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 "ln ../input/$a.ly ./$a.ly.txt";
29     system "cd ..; lilypond input/$a; tex $texfile;".
30         "dvips -o $texfile.ps $texfile;";
31
32     # generate the pixmap at twice the size, then rescale (for antialiasing)
33     if ( ! -f "$a.gif" ) {
34     system "mv ../$texfile.ps $a.ps; ".
35         "mv ../lelie.midi $a.midi; ".
36         "gs -q -sDEVICE=ppmraw -sOutputFile=- -r200 -dNOPAUSE  $a.ps -c quit |pnmscale 0.5| ppmtogif > $a.gif";
37     }   
38 }
39
40 system "tar hcf website.tar *.html *.gif lelie_logo.png *.ps *.ly.txt *.midi docxx/;" .
41     "gzip -f9 website.tar;"