I am trying to read schematic file and get some details from the schematic file. Is there any easier to way to parse the data directly (like some packages which kicad uses, so that I don’t have to write the parsing code separately).
This may help, though it may not be real quick to dial-in what you want. But, once done (and setup with macro), you won’t need to do it again, just load desired file with the macro.
Using LibreOffice, open a new Spreadsheet, select cell1 and select Open. Locate the Schematic file. Set the Delimiters and what you want (and how you want it manipulated).
Once done, formatted/Edited for Pretty-ness and happy, make it a Libre Macro (simple to do).
Screenshot of the Open panel…
I want to use python and use the data for extracting all the symbol reference in the schemaric…
FYI - Parsing a spreadsheet is simple so, once getting your Schematic loaded into the spreadsheet, parse/sort what/how you want.
You can do a ‘Watch-Me-Do’ to create the Macro. Quick example shows my BOM macro doing formatting on a Kicad exported BOM…
But, if you like Python (yuk) go for it!
I am trying to build external plugin, or else I would use excel sheet (it looks way easy)
sexpdata Python package.
How did it go? Did you manage two write some python code to extract what you needed? If so, can tou share it?
I currently have the need to extract all symbols from a schematic, but also to merge symbol libs and change information like footprint library in symbols in a symbol library. Some of the things can be easily done with find and replace, but others would benifit from a parser. And it would probably be easier with a starting point if available.