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 1
1
import os
2
2
from lxml import etree
3
3
from 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)
11
25
12
26
#root = objectify.parse(myFileName)
13
27
root = objectify .fromstring (myFile .read (statinfo .st_size ))
Original file line number Diff line number Diff line change 1
1
EESchema-DOCLIB Version 2.0
2
2
#
3
3
$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>
5
12
K ALICE BOB PROD_ID:CRP-0001
6
13
$ENDCMP
7
14
#
You can’t perform that action at this time.
0 commit comments