[cad-linux] Re: extractbmp bash script

  • From: "Brian Johnson" <bjohnson@xxxxxxxxxxxx>
  • To: <cad-linux@xxxxxxxxxxxxx>
  • Date: Fri, 28 Dec 2001 15:00:56 -0500

Okay, we'll do it this way then


#!/bin/sh

#Script to work with cron jobs to process directories of dwgs
#and extract their preview bmps

# Extract bmp from .dwg files
for file in `find $dir -name '*.dwg'`
do
  /home/jecinc/dnloads/CAD/extractbmp-0.1/extractbmp/extractbmp $file 1>
/dev/null 2> /dev/null
done

# Extract bmp from .DWG files
for file in `find $dir -name '*.DWG'`
do
  /home/jecinc/dnloads/CAD/extractbmp-0.1/extractbmp/extractbmp $file 1>
/dev/null 2> /dev/null
done

# Change .bmp to .png
for file in `find $dir -name '*.bmp'`
do
  # Use ImageMagick to convert the bmp files to png
  convert bmp:$file png:$file.png 1> /dev/null 2> /dev/null

  # Remove .bmps to clean up and to allow future updates and removed .dwgs
  rm $file
done


-----Original Message-----
From: cad-linux-bounce@xxxxxxxxxxxxx
[mailto:cad-linux-bounce@xxxxxxxxxxxxx]On Behalf Of Brian Johnson
Sent: Friday, December 28, 2001 2:48 PM
To: cad-linux@xxxxxxxxxxxxx
Subject: [cad-linux] Re: extractbmp bash script




Hopefully this will keep the attachment

-----Original Message-----
From: cad-linux-bounce@xxxxxxxxxxxxx
[mailto:cad-linux-bounce@xxxxxxxxxxxxx]On Behalf Of Brian Johnson
Sent: Friday, December 28, 2001 2:39 PM
To: cad-linux@xxxxxxxxxxxxx
Subject: [cad-linux] extractbmp bash script




I made this bash shell script to process directories of .dwg files into .png
files (in the first step to creating a web gallery of Acad blocks)

This is what I ended up with (it's not pretty, but it works)

My next step is to make web pages of the .pngs for each directory with a
link to each subdirectory page






-- Binary/unsupported file stripped by Listar --
-- Type: application/octet-stream
-- File: bmp.sh



Other related posts: