www.delorie.com/archives/browse.cgi | search |
John Doty <jpd AT noqsi DOT com> writes: > On Dec 22, 2015, at 10:50 PM, gedau AT igor2 DOT repo DOT hu wrote: > >> >> >> On Tue, 22 Dec 2015, John Doty wrote: >> >>> >>> On Dec 22, 2015, at 10:16 PM, gedau AT igor2 DOT repo DOT hu wrote: >>> >>>> It's painful, and I am fully aware of risking a rewrite if the >>>> file format changes. I am also fully aware of the fact that >>>> libgeda exists and it is invented exactly for this kind of stuff. >>> >>> Going through libgeda doesn?t insulate you from change, since the libgeda API is no more stable than the file format. >> >> >> That's clear. By "is invented exactly for this kind of stuff" I >> didn't mean "invented to avoid (API) changes" but "invented to avoid >> the need to write parsers by hand" - in the sense that one can use >> it instead of writing a parser. > > But is it *really* so hard to write a parser for the .sch format? > Seems pretty trivial to me. Easier than figuring out what an extra > layer is actually doing and wrapping it in yet another layer to > support what *I* need. That’s why I like simple, transparent file > formats. What I value most in both the gschem and pcb file formats is that they are easily AWK parsable, so that simple ad-hoc commandline scripts can cover deficiencies of the tools. For example, rigid-flex boards with more than two outer layers are handled with a little awk postprocessing of the pcb file before Gerber export. The awk code is embedded in the Makefile. If, say, xml format is employed in the future, it will nice if the tools write the xml in a restricted way such that awk can still be used to read and manipulate the files. This is true for the current pcb format as well. This kind of ad-hoc scripting relies on the whitespace/newline placement that the tools write. I have used gnumeric spreadsheets to generate pcb file fragments for complicated circular board outlines, hole and connector placements. Emacs is regularly used to edit layout and schematics files, especially footprints. -- Stephan
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |