From c8914d368652eeb254f204e99423dec218e64557 Mon Sep 17 00:00:00 2001 From: fred Date: Sun, 24 Mar 2002 19:44:56 +0000 Subject: [PATCH] lilypond-0.0.66 --- Documentation/index.pod | 6 +-- bin/make_website | 103 +++++++++++++++++++++++++++++++++------- 2 files changed, 88 insertions(+), 21 deletions(-) diff --git a/Documentation/index.pod b/Documentation/index.pod index b90e3b463c..d650acee2c 100644 --- a/Documentation/index.pod +++ b/Documentation/index.pod @@ -102,21 +102,21 @@ errors =item * -The lilypond logo (Big) +The lilypond logo (Big, format: .gif) =item * -The lilypond logo (in gif format, medium size) +The lilypond logo (medium size, format: .gif) =item * -examples: MIDI, PS, GIF and input. +examples: MIDI, PS, .gif and input. diff --git a/bin/make_website b/bin/make_website index ce8c6bb793..f5d540306e 100755 --- a/bin/make_website +++ b/bin/make_website @@ -2,9 +2,11 @@ # stupid script to generate WWW site. use FileHandle; +use Getopt::Long; my $lily_version; my $footstr; my $mw_id = ""; + sub get_version { my ($vstr)=(""); @@ -49,8 +51,14 @@ sub my_system { my (@cmds) = @_; foreach $cmd (@cmds) { + my ($ignoreret)=0; + if ( $cmd =~ /^-/ ) { + $ignoreret = 1; + $cmd = substr ($cmd, 1); + } + my $ret = ( system ($cmd)); - if ($ret) { + if (!$ignoreret && $ret) { print STDERR "\nmake_website: failed on command \`$cmd\' (status $ret)\n"; exit 2; } @@ -68,6 +76,25 @@ sub gen_html my_system "make -kC .. html"; } +sub ps_to_gif +{ + my ($a)=@_; + + if (! -f "$a.ps" ) { + my_system("gunzip -c $a.ps.gz > $a.ps"); + } + my_system "gs -q -sDEVICE=ppmraw -sOutputFile=- -r200 -dNOPAUSE $a.ps -c quit |pnmscale 0.5| ppmtogif > $a.gif"; +} + + +sub ps_to_jpeg +{ + my ($a)=@_; + my $in = "$a.ps"; + + my_system "gs -q -sDEVICE=ppmraw -sOutputFile=- -r200 -dNOPAUSE $in -c quit |pnmscale 0.5| cjpeg -grayscale > $a.jpeg"; +} + sub gen_examples { print "generating examples: \n"; @@ -82,19 +109,22 @@ sub gen_examples if ( ! -f "$a.ly.txt" ) { my_system "ln $depth/input/$a.ly ./$a.ly.txt"; } - if ( ! -f "$a.ps.gz" ) { + if (! -f "$a.dvi" ) { my_system "lilypond $a;", - "$tex", - "dvips -o $a.ps $texfile;"; - + "$tex", "-mv $texfile.dvi $a.dvi"; + } + if ( ! -f "$a.ps.gz" && ! -f "$a.ps" ) { + my_system "dvips -o $a.ps $a.dvi"; } - my_system "mv lelie.midi $a.midi; " if ( -f "lelie.midi" ); + my_system "mv lelie.midi $a.midi; " if ( -f "lelie.midi" ); # generate the pixmap at twice the size, then rescale (for antialiasing) if ( ! -f "$a.gif" ) { - my_system "gs -q -sDEVICE=ppmraw -sOutputFile=- -r200 -dNOPAUSE $a.ps -c quit |pnmscale 0.5| ppmtogif > $a.gif", - "gzip $a.ps"; + ps_to_gif($a); + } + if ( ! -f "$a.ps.gz" ) { + my_system "gzip -f $a.ps"; } } } @@ -119,20 +149,28 @@ sub gen_list $inputf="$a.ly.txt"; $giff="$a.gif"; + $jpegf="$a.jpeg"; + $pngf = "$a.png"; $psf="$a.ps.gz"; $midif="$a.midi"; - print HTMLLIST "