#!/usr/bin/perl -s use POSIX qw(locale_h); setlocale(&POSIX::LC_ALL, "pt_PT"); use locale; use lib ('..'); use lyra; our ($ag,$a5,$a4); my $opt= {outputfile => "_ex11.tex", index=>1, pageformat =>"agenda", (($compact)?(newpage =>'\pagebreak[2]'):()), column =>1}; my $grep=shift || "ex11.grep"; my $dir=shift || "/home/jj/svn/music/musica"; my @fs=(); for( `egrep -i -w -l -f $grep $dir/*.lyr`) { chomp; push(@fs,$_); } @fs = lyra::songsort(@fs); if($ag) { lyra::mksongbook({%$opt, pageformat => "agenda", column => 1},@fs);} elsif($a5){ lyra::mksongbook({%$opt, pageformat => "b5", column => 2},@fs);} elsif($a4){ lyra::mksongbook({%$opt, pageformat => "a4", column => 2, abc=>2 },@fs);} else { lyra::mksongbook({%$opt, pageformat => "a4", abc=>2, column => 2},@fs); } lyra::make("_ex11.agpdf") if $ag; lyra::make("_ex11.a5pdf") if $a5; lyra::make("_ex11.pdf") if !$a5 && !$ag; __END__