Created
May 24, 2026 13:12
-
-
Save liamHowatt/c493567ee74d85fe466d45480981fa35 to your computer and use it in GitHub Desktop.
Convert a pinout exported from STM32CubeMX to an Easy EDA schematic symbol pinout
This file contains hidden or 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 csv | |
| import sys | |
| def main(): | |
| if len(sys.argv) < 1+1 or len(sys.argv) > 1+2: | |
| print(f"usage: {sys.argv[0]} INPUT_CSV [OUTPUT_FILE]") | |
| return | |
| fi = open(sys.argv[1], newline='') | |
| fo = sys.stdout | |
| if len(sys.argv) == 3 and sys.argv[2] != '-': | |
| fo = open(sys.argv[2], "w") | |
| for row in csv.DictReader(fi): | |
| print(f'{row["Position"]}, {row["Name"]}', file=fo) | |
| if __name__ == "__main__": | |
| main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment