Skip to content

Commit

Permalink
Updated KiCad Library Utils, still messing up library files
Browse files Browse the repository at this point in the history
  • Loading branch information
eeintech committed Dec 1, 2022
1 parent 87e5eac commit 05f2035
Show file tree
Hide file tree
Showing 4 changed files with 805 additions and 535 deletions.
10 changes: 3 additions & 7 deletions kintree/common/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,9 @@ def create_library(library_path: str, symbol: str, template_lib: str):

if not os.path.exists(library_path):
os.mkdir(library_path)
new_lib_file = os.path.join(library_path, symbol + '.lib')
new_dcm_file = new_lib_file.replace('.lib', '.dcm')
template_dcm = template_lib.replace('.lib', '.dcm')
if not os.path.exists(new_lib_file):
copyfile(template_lib, new_lib_file)
if not os.path.exists(new_dcm_file):
copyfile(template_dcm, new_dcm_file)
new_kicad_sym_file = os.path.join(library_path, symbol + '.kicad_sym')
if not os.path.exists(new_kicad_sym_file):
copyfile(template_lib, new_kicad_sym_file)


def download(url, filetype='API data', fileoutput='', timeout=3, enable_headers=False, silent=False):
Expand Down

0 comments on commit 05f2035

Please sign in to comment.