Seems to do what I want now.
One argument, the directory of the Pd files.
It incorporates awk script inline to correct
the font problems and slows it down enough
to be okay even for large Pd files, but still
fast enough.

Thanks all for help with this.



On Sun, 29 Apr 2007 23:40:42 +1000
simon wise <[EMAIL PROTECTED]> wrote:

> I think I needed dinner -
> 
> wait isn't mean what I thought it was,
> don't know why it worked
> 
> but it seems to work ok without it - and I worked out how to close  
> the patch
> 
> attached are better examples
> 
> simon
> 
> 
> 
> 
> On 29 Apr 2007, at 10:04 PM, simon wise wrote:
> 
> >
> > On 29 Apr 2007, at 3:48 AM, Frank Barknecht wrote:
> >
> >> I tried to make this into a sh-script, but while it prints okay, it
> >> only generates an "empty" ps-file: the ps-file isn't empty, but  
> >> the patch
> >> it shows is.
> >>
> >> Anyway, attached also is the sh-script that doesn't work correctly.
> >> Any ideas for a fix?
> >
> > same here - possibly the patch gets printed before it is drawn??
> >
> > with the 'wait' these work for me - with printer.pd already open in  
> > pd, try:
> >
> > pdprint2.sh name /path/to/directory
> >
> >
> >
> > simon
> >
> >
> > <printer.pd>
> >
> > <pdprint2.sh>
> >
> 
> 


-- 
Use the source

Attachment: printer.pd
Description: Binary data

#!/bin/sh
# print a directory of pd files as postscript
# args: 1: directory of pd patches to print 
# try altering /findfont 9/ to another font size if problems

pd -nomidi -noaudio ./printer.pd &
sleep 2
for i in $1*.pd
do
echo printing $i
sleep 1
echo "pd open $i ./;" | pdsend 3001
sleep 1
echo "pd-$i print $i.ps, menuclose;" | pdsend 3001
sleep 1
awk 'BEGIN  {last = -10}
/findfont 9/  {
        last=NR
        $3 = 11.3
    }
    {
        if (NR == last+2) {
            $1 = $1+1
            $2 = $2-2
        }
        print
    }' $i.ps >  $i-cp.ps
rm $i.ps
mv $i-cp.ps $i.ps
done
_______________________________________________
PD-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list

Reply via email to