Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def main():
parser = ap.ArgumentParser(
description="Generate single & multi-unit schematic symbols for KiCad from a CSV file."
)
parser.add_argument(
"-v", "--version", action="version", version="KiPart " + __version__
)
parser.add_argument(
"input_files",
nargs="+",
type=str,
metavar="file.[csv|txt|xlsx|zip]",
help="Files for parts in CSV/text/Excel format or as such files in .zip archives.",
)
parser.add_argument(
"-r",
"--reader",
nargs="?",
# type=str.lower,
type=lambda s: unicode(s).lower(),
choices=[
"generic",
def main():
parser = ap.ArgumentParser(
description="Convert a KiCad schematic symbol library file into a CSV file for KiPart."
)
parser.add_argument(
"-v", "--version", action="version", version="kilib2csv " + __version__
)
parser.add_argument(
"input_files",
nargs="+",
type=str,
metavar="file.lib",
help="KiCad schematic symbol library.",
)
parser.add_argument(
"-o",
"--output",
nargs="?",
type=str,
metavar="file.csv",
help="CSV file created from schematic library file.",
)