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

gEDA-user: Extract all footprints from a layout



Hi. 
I just whipped up a little script to extract all footprints from a 
layout (see below). While at it, I noticed that "Save_Buffer_To_file"
reverses the order of the ElementLine statements on save. The order of
Pads is conserved. Is this deliberate?    

---<)kaimartin(>---

/------------------
#!/bin/sh
awk '
   BEGIN { FS = "\"" }        # use " as field separator
   $1 ~ /Element\[/ {         # if the line is an Element statement
      fp_name = $8".fp"       # extract footprint name from Element statement
      print $0 > fp_name      # print line with Element statement to file
      getline                 # get the next line 
      while ( $1 != "\t)" ) { # while line does not start with tab plus )
        print $0 > fp_name    # append the line to file 
        getline               # get the next line
      }                       # end of while loop
      print $0 > fp_name      # append the last line
   }
' $1
\---------------------

-- 
Kai-Martin Knaak                                  tel: +49-511-762-2895
UniversitÃt Hannover, Inst. fÃr Quantenoptik      fax: +49-511-762-2211	
Welfengarten 1, 30167 Hannover           http://www.iqo.uni-hannover.de
GPG key:    http://pgp.mit.edu:11371/pks/lookup?search=Knaak+kmk&op=get



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