File tree Expand file tree Collapse file tree 2 files changed +29
-8
lines changed
Expand file tree Collapse file tree 2 files changed +29
-8
lines changed Original file line number Diff line number Diff line change 11import os
22from lxml import etree
33from lxml import objectify
4-
5- myFileName = "C:\github\SparkFun-Eagle-Libraries\SparkFun-IC-Conversion.lbr"
6-
7- statinfo = os .stat (myFileName )
8-
9- myFile = open (myFileName , "r" )
10- #print myFile.read(statinfo.st_size)
4+ import sys
5+
6+ print "" # print a new line
7+
8+ numArgs = len (sys .argv )
9+ if numArgs < 2 :
10+ #Print help
11+ print "Not enough arguments"
12+ print "Example: Python file.py C:\github\SparkFun-Eagle-Libraries\SparkFun-IC-Conversion.lbr"
13+ exit ()
14+
15+ myFileName = sys .argv [1 ]
16+
17+ if os .path .isfile (myFileName ) == True :
18+ statinfo = os .stat (myFileName )
19+ myFile = open (myFileName , "r" )
20+ else :
21+ print "Invalid file name"
22+ exit ()
23+
24+ #print myFile.read(statinfo.st_size)
1125
1226#root = objectify.parse(myFileName)
1327root = objectify .fromstring (myFile .read (statinfo .st_size ))
Original file line number Diff line number Diff line change 11EESchema-DOCLIB Version 2.0
22#
33$CMP AT25SF041
4- D This is a test part for testing where does this description get displayed?
4+ D <h3>VS1000D</h3>
5+ D <p>Ogg Vorbis Player IC with USB and NAND FLASH Interface 12 MHz LQFP-48</p>
6+ D <h3></h3>
7+ D <p></p>
8+ D <p><a href="">Datasheet</a></p>
9+ D <h4>SparkFun Products</h4>
10+ D <ul>
11+ D <li><a href="https://www.sparkfun.com/products/8300">Storefront component: Ogg Vorbis Codec IC - VS1000D</a> (COM-08300)</li>
512K ALICE BOB PROD_ID:CRP-0001
613$ENDCMP
714#
You can’t perform that action at this time.
0 commit comments