App-HPGL2Cadsoft

 view release on metacpan or  search on metacpan

bin/hpgl2cadsoft.pl  view on Meta::CPAN

#! /usr/bin/env perl

use strict;
use Modern::Perl;

use App::HPGL2Cadsoft;
use Getopt::Long;
use Pod::Usage;

my ( $infile, $outfile, $scaling, $help, $man);

GetOptions(
    'input=s' =>   \$infile,
    'output=s'  => \$outfile,
    'scaling=s' => \$scaling,
    'help|?|h' =>  \$help,
    'man'      =>  \$man,
) or pod2usage(2);
pod2usage(1)
  if ( $help || !defined($infile) );
pod2usage( -exitstatus => 0, -verbose => 2 ) if ($man);

my $params;
$params->{input_file} = $infile;

# Auto-generate output file if none is specified.
if (!defined $outfile) {
    # Strip extension from inputfile name
    $infile =~ s{\.[^.]+$}{};
    $outfile = $infile . ".scr";
}

$params->{output_file} = $outfile;

$params->{scaling_factor} = $scaling if (defined $scaling);

my $convertor = App::HPGL2Cadsoft->new( $params );
$convertor->run();

# PODNAME: hpgl2cadsoft.pl
# ABSTRACT: program to convert a HPGL graphical file into a Cadsoft Eagle script for importing into your PCB

__END__

=pod

=encoding UTF-8

=head1 NAME

hpgl2cadsoft.pl - program to convert a HPGL graphical file into a Cadsoft Eagle script for importing into your PCB

=head1 VERSION

version 0.01

=head1 SYNOPSIS

Converts a HPGL file into a Cadsoft Eagle script. Usage:

    hpgl2cadsoft.pl --input <inputfile.hpgl> --output <outputfile.scr> --scaling <scalingfactor>

=head1 DESCRIPTION

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 0.549 second using v1.00-cache-2.02-grep-82fe00e-cpan-1925d2aa809 )