#!/usr/bin/env python
"""
Footprint PCB layouting program
Copyright (C) 2012 Danny Milosavljevic
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program.  If not, see <http://www.gnu.org/licenses/>.
"""

"""
* see http://www.ni.com/white-paper/5416/en
Rname n1 n2 value
Rname n1 n2 <value> <Mname> <L=Length> <W=Width> <Temp=T>
Cname n+ n- value <IC=INCOND>
Cname n1 n2 <value> <Mname> <L=Length> <W=Width> <IC=VAL>
Lname n+ n- value <IC=INCOND>
Kname Lname1 Lname2 value
Sname n+ n- nc+ nc- Mname <ON><OFF>
Wname n+ n- VNAM MnameL <ON><OFF>
Vname n+ n- <DC<> DC/TRAN VALUE> <AC <ACMAG <ACPHASE>>> <DISTOF1 <F1MAG <F1PHASE>>> <DISTOF2 <F2MAG <F2PHASE>>>
Iname n+ n- <<DC> DC/TRAN VALUE> <AC <ACMAG <ACPHASE>>> <DISTOF1 <F1MAG <F1PHASE>>> <DISTOF2 <F2MAG <F2PHASE>>>
Gname n+ n- nc+ nc- value
Ename n+ n- nc+ nc- value
Fname n+ n- Vname value
Hname n+ n- Vname value
Bname n+ n- <I=EXPR> <V=EXPR>
Oname n1 n2 n3 n4 Mname
Uname n1 n2 n3 Mname L=LEN <N=LUMPS>
Dname n+ n- Mname <Area> <OFF> <IC=VD> <TEMP=T>
Qname nC nB nE <nS> Mname <AREA> <OFF> <IC=VBE, VCE> <TEMP=T>
Jname nD nG nS Mname <Area> <OFF> <IC=VDS, VGS> <TEMP=T>
Mname ND NG NS NB MNAME <L=VAL> <W=VAL> <AD=VAL> <AS=VAL> <PD=VAL> <PS=VAL> <NRD=VAL> <NRS=VAL> <OFF> <IC=VDS, VGS, VBS> <TEMP=T>
Zname nD nG nS Mname <Area> <OFF> <IC=VDS, VGS>
"""

import subprocess

def save(list1, outputFile):
	node numbering
	item type conversion
	external program execution
	output parsing
	error handling
