delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2015/07/14/08:19:16

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
X-Recipient: geda-user AT delorie DOT com
Date: Tue, 14 Jul 2015 14:19:01 +0200 (CEST)
X-X-Sender: igor2 AT igor2priv
To: "Mitch Davis (mjd+geda-user AT hackvana DOT com) [via geda-user AT delorie DOT com]" <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] why I parse sch: gnetlist, writing backends (Back
annotation)
In-Reply-To: <CA+KzSg+_mCiYjGNimu03WzJ43pOkxtVMNQRE7jaBpwjZVgPs+Q@mail.gmail.com>
Message-ID: <alpine.DEB.2.00.1507141418050.6924@igor2priv>
References: <559E86A4 DOT 3040109 AT ecosensory DOT com> <DC183265-AD4B-4707-970F-1EE5D3578126 AT noqsi DOT com> <201507091843 DOT t69IhGF6028321 AT envy DOT delorie DOT com> <6392CE1A-AFA0-4D62-979C-3F35786422BD AT noqsi DOT com> <201507092127 DOT t69LRHRC001744 AT envy DOT delorie DOT com> <559EFE69 DOT 1040601 AT zoot DOT drehmel DOT com>
<201507092332 DOT t69NWUEN006109 AT envy DOT delorie DOT com> <alpine DOT DEB DOT 2 DOT 00 DOT 1507100501200 DOT 6924 AT igor2priv> <20150710132650 DOT GA15876 AT localhost DOT localdomain> <alpine DOT DEB DOT 2 DOT 00 DOT 1507101547500 DOT 6924 AT igor2priv> <20150710152308 DOT GA17023 AT localhost DOT localdomain>
<alpine DOT DEB DOT 2 DOT 00 DOT 1507101813250 DOT 6924 AT igor2priv> <alpine DOT DEB DOT 2 DOT 11 DOT 1507102316100 DOT 2863 AT nimbus> <CA+KzSg+_mCiYjGNimu03WzJ43pOkxtVMNQRE7jaBpwjZVgPs+Q AT mail DOT gmail 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

  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.

--0-414698107-1436876341=:6924
Content-Type: TEXT/PLAIN; charset=UTF-8; format=flowed
Content-Transfer-Encoding: QUOTED-PRINTABLE



On Tue, 14 Jul 2015, Mitch Davis (mjd+geda-user AT hackvana DOT com) [via geda-use=
r AT delorie DOT com] wrote:

>On Sat, Jul 11, 2015 at 7:34 AM, Roland Lutz <rlutz AT hedmen DOT org> wrote:
>      On Fri, 10 Jul 2015, gedau AT igor2 DOT repo DOT hu wrote:
>            So next time I have something similar to solve, I
>            will first ask you for the scheme code and only if
>            that fails I do the dirty sch-parsing awk fewliner.
>
>
>      You could use Xorn.=C2=A0 Since this uses the actual gEDA parsing
>      code, the result is exactly what gEDA would see when reading the
>      file.=C2=A0 Taking the "outputting coords of line segments" task as
>      an example, this would be:
>
>      =C2=A0 =C2=A0 import xorn.storage
>      =C2=A0 =C2=A0 from xorn.geda.read import read
>
>      =C2=A0 =C2=A0 sch =3D read('some-schematic.sch')
>
>      =C2=A0 =C2=A0 for ob in sch.toplevel_objects():
>      =C2=A0 =C2=A0 =C2=A0 =C2=A0 data =3D ob.data()
>      =C2=A0 =C2=A0 =C2=A0 =C2=A0 if isinstance(data, xorn.storage.Line):
>      =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 print 'X1: %d Y1: %d X2: %=
d Y2: %d' % (
>      =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 data.x, data=
=2Ey, data.x + data.width, data.y +
>      data.height)
>
>
>I don't know why everyone is complaining about Scheme.=C2=A0 I can read th=
is just
>fine, the first time I ever saw it.

One of the reasons for that might be that the above code is not in Scheme.

</sarcasm>


--0-414698107-1436876341=:6924--

- Raw text -


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