[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: Printing schematics



Hi,


I use a modified version of this script, which just coppies the input to the
ouptput when only one file is given.

Enjoy...

#!/usr/bin/perl
# -*- perl -*-
use Shell;

if ($#ARGV == 0) {
	my $my_ps = shift;
	open(PS,$my_ps);
	while(<PS>) {
		print $_;
	}
	exit(0);
} 
$need_prolog = 1;

$pageno = 0;

for $ps (@ARGV) {
    open(PS, $ps);
    $print = $need_prolog ? 1 : 0;
    while (<PS>) {
	if (/%%Page: \d/) {
	    $pageno++;
	    $_ = "%%Page: $pageno\n";
	    $print = 1;
	}
	$Print = 0 if /^%%End/;

	print if $print;
    }
    close PS;
    $need_prolog = 0;
}

print "%%End\n";


On Thu, 31 Jan 2008 10:41:25 -0500
DJ Delorie <dj@xxxxxxxxxxx> wrote:

> 
> > Hi DJ, Yes please I would like to have that script.  Ian.
> 
> #!/usr/bin/perl
> # -*- perl -*-
> 
> $need_prolog = 1;
> 
> $pageno = 0;
> 
> for $ps (@ARGV) {
>     open(PS, $ps);
>     $print = $need_prolog ? 1 : 0;
>     while (<PS>) {
> 	if (/%%Page: \d/) {
> 	    $pageno++;
> 	    $_ = "%%Page: $pageno\n";
> 	    $print = 1;
> 	}
> 	$print = 0 if /^%%End/;
> 
> 	print if $print;
>     }
>     close PS;
>     $need_prolog = 0;
> }
> 
> print "%%End\n";
> 
> 
> _______________________________________________
> geda-user mailing list
> geda-user@xxxxxxxxxxxxxx
> http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
> 


--
Levente
http://web.interware.hu/lekovacs



_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user