X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f X-Recipient: geda-user AT delorie DOT com From: geda AT psjt DOT org (Stephan =?utf-8?Q?B=C3=B6ttcher?=) To: geda-user AT delorie DOT com Subject: Re: [geda-user] A fileformat library References: <1512221837 DOT AA25291 AT ivan DOT Harhan DOT ORG> <20151222232230 DOT 12633 DOT qmail AT stuge DOT se> <0F6F1D0F-4F07-48EA-90FE-836EAD4E2354 AT noqsi DOT com> Date: Wed, 23 Dec 2015 18:11:36 +0100 In-Reply-To: (John Doty's message of "Wed, 23 Dec 2015 09:26:57 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id tBNHBot2031685 Reply-To: geda-user AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: geda-user AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk John Doty 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