Wikipedia:WikiProject Chemistry/Structure drawing workgroup/Mysid's script: Difference between revisions
Content deleted Content added
Remove cropping code (better to do it in BKchem) |
cleaner filename usage and error handling |
||
Line 4:
use Image::Magick;
@ARGV == 1 or die "Usage: $! FILENAME.svg\n";
if(! -f $ARGV[0])▼
#Open files
open INPUT, '<', $infile or die "Could not read $infile: $!\n";
▲$outfile1 = $ARGV[0];
$outfile1 =~ s/.svg/1.svg/;
open OUTPUT,
while (<INPUT>) {
Line 59 ⟶ 58:
open INPUT,
$outfile2 = $
$outfile2 =~ s/.svg/2.svg/;
open OUTPUT,
while (<INPUT>) {
#Take out redundant groups.
|