Skip to content

Commit

Permalink
Fix KiCad capitalization (not so trivial)
Browse files Browse the repository at this point in the history
These changes could break the API, let's say,
if anyone is parsing the XLM or HTML outputs.

Please consider before merging/accepting.
  • Loading branch information
diegoherranz committed Jan 14, 2018
1 parent 6190910 commit 9ec3a0b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion KiBOM/html_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def WriteHTML(filename, groups, net, headings, prefs):
html.write("</table>\n")
html.write("<br>\n")
html.write("<h2>Component Groups</h2>\n")
html.write('<p style="background-color: {bg}">Kicad Fields (default)</p>\n'.format(bg=BG_KICAD))
html.write('<p style="background-color: {bg}">KiCad Fields (default)</p>\n'.format(bg=BG_KICAD))
html.write('<p style="background-color: {bg}">Generated Fields</p>\n'.format(bg=BG_GEN))
html.write('<p style="background-color: {bg}">User Fields</p>\n'.format(bg=BG_USER))
html.write('<p style="background-color: {bg}">Empty Fields</p>\n'.format(bg=BG_EMPTY))
Expand Down
2 changes: 1 addition & 1 deletion KiBOM/xml_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def WriteXML(filename, groups, net, headings, prefs):
attrib['Number_of_PCBs'] = str(prefs.boards)
attrib['Total_Components'] = str(nBuild)

xml = ElementTree.Element('KiCAD_BOM', attrib = attrib, encoding='utf-8')
xml = ElementTree.Element('KiCad_BOM', attrib = attrib, encoding='utf-8')

for group in groups:
if prefs.ignoreDNF and not group.isFitted():
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ A CSV file output can be generated simply by changing the file extension
An XML file output can be generated simply by changing the file extension

<?xml version="1.0" ?>
<KiCAD_BOM BOM_Date="15-May-16 5:27:03 PM" KiCad_Version="Eeschema (2016-05-06 BZR 6776, Git 63decd7)-product" Schematic_Date="2016-05-15" Schematic_Source="C:/bom_test/Bom_Test.sch" Schematic_Version="A.1" components="13" groups="9">
<KiCad_BOM BOM_Date="14-Jan-18 5:27:03 PM" KiCad_Version="Eeschema (2016-05-06 BZR 6776, Git 63decd7)-product" Schematic_Date="2016-05-15" Schematic_Source="C:/bom_test/Bom_Test.sch" Schematic_Version="A.1" components="13" groups="9">
<group Datasheet="" Description="Unpolarized capacitor" Footprint="C_0805" Notes="" Part="C" Quantity="2" Rating="" References="C1 C2" Value="0.1uF" Vendor=""/>
<group Datasheet="" Description="Unpolarized capacitor" Footprint="C_0805" Notes="" Part="C" Quantity="2" Rating="" References="C3 C5" Value="2.2uF" Vendor=""/>
<group Datasheet="" Description="Unpolarized capacitor" Footprint="C_0603" Notes="" Part="C" Quantity="1" Rating="100V X7R" References="C4" Value="2.2uF" Vendor=""/>
Expand All @@ -341,7 +341,7 @@ An XML file output can be generated simply by changing the file extension
<group Datasheet="" Description="Resistor" Footprint="R_0603" Notes="" Part="R" Quantity="1" Rating="0.5W 0.5%" References="R5" Value="100" Vendor=""/>
<group Datasheet="" Description="Resistor" Footprint="R_0805" Notes="" Part="R" Quantity="2" Rating="" References="R1 R2" Value="470R" Vendor="Digikey"/>
<group Datasheet="http://www.ti.com/lit/ds/symlink/max232.pdf" Description="Dual RS232 driver/receiver, 5V supply, 120kb/s, 0C-70C" Footprint="DIP-16_W7.62mm" Notes="Do not fit" Part="MAX232" Quantity="1 (DNF)" Rating="" References="U1" Value="MAX232" Vendor=""/>
</KiCAD_BOM>
</KiCad_BOM>

## Contributors

Expand Down

0 comments on commit 9ec3a0b

Please # to comment.