delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2014/04/17/22:19:43

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
X-Recipient: geda-user AT delorie DOT com
Date: Fri, 18 Apr 2014 04:24:11 +0200 (CEST)
X-X-Sender: igor2 AT igor2priv
To: geda-user AT delorie DOT com
X-Debug: to=geda-user AT delorie DOT com from="gedau AT igor2 DOT repo DOT hu"
From: gedau AT igor2 DOT repo DOT hu
Subject: Re: [geda-user] pcb graphical objects spec
In-Reply-To: <201404172108.s3HL8q7I020414@envy.delorie.com>
Message-ID: <alpine.DEB.2.00.1404180415210.21174@igor2priv>
References: <CAHBVutDDe4byff1H62pbpd-AVpPwbabAT7h9tWpqsFZu=_c70A AT mail DOT gmail DOT com> <201404171458 DOT s3HEwG4r032541 AT envy DOT delorie DOT com> <CAC4O8c9YudRFRifhv0bdft2J_7jFVnLD2b1O=BQ8PgGaPJtw=g AT mail DOT gmail DOT com> <201404171815 DOT s3HIFreo008095 AT envy DOT delorie DOT com>
<lipc0k$6cv$1 AT ger DOT gmane DOT org> <201404172021 DOT s3HKLTWI018066 AT envy DOT delorie DOT com> <CAC4O8c8P-DuatFV=je_54d6gT+gLHCECSSiUeR-aHOwHPxeNUQ AT mail DOT gmail DOT com> <201404172108 DOT s3HL8q7I020414 AT envy DOT delorie DOT com>
User-Agent: Alpine 2.00 (DEB 1167 2008-08-23)
MIME-Version: 1.0
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


On Thu, 17 Apr 2014, DJ Delorie wrote:

>> Its great to have a spec but I bet 9/10 people that parse .pcb files
>> aren't ever looking at it, but just working from the file to do what
>> they need.
>
> Given that the file is just a bunch of unlabelled numbers, the only
> way to understand it is to read the spec.  So I expect that far more
> people read the spec than you think.

I have few scripts too. Never found the format spec for multiple reasons. 
It was relatively straight-forward to reverse engineer it (change one 
property, "save as", diff). This is, of course, not the proper way 
and if my script would break on a format change while the new format is 
still by the spec, I wouldn't blame PCB or the spec. Still, I believe 
too, that this is how many people write their scripts for PCB.

I see a really simple solution here: currently PCB saves with predictable 
newlines. There could be a command line switch or script option to enforce 
it. For current versions this could be dummy, for later versions if anyone 
would chnage newline placement he should respect this setting (extra ifs). 
There could be a one-liner script pcb-tidy, which would call pcb to 
non-interactively load and save a file using this option.

This would convert any legal format to a script-friendly format and 
doesn't seem to be much effort on either side. From the scripter's point 
of view it's not worse than tidy for html, which is very convenient even 
if one uses a real html parser in the next step.

Regards,

Tibor


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019