Created
January 4, 2019 21:14
-
-
Save ebenolson/07af5bf0919dfa7f5585577ad073c120 to your computer and use it in GitHub Desktop.
KiCAD Python script to convert old .mod footprint libraries to .kicad_mod
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
from pcbnew import * | |
infile = sys.argv[1] | |
outdir = sys.argv[2] | |
inplugin = IO_MGR.PluginFind(IO_MGR.GuessPluginTypeFromLibPath(infile)) | |
outplugin = IO_MGR.PluginFind(IO_MGR.GuessPluginTypeFromLibPath(outdir)) | |
for name in inplugin.FootprintEnumerate(infile): | |
fp = inplugin.FootprintLoad(infile, name) | |
outplugin.FootprintSave(outdir, fp) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment