delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2020/10/12/05:23:05

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
X-Recipient: geda-user AT delorie DOT com
Date: Mon, 12 Oct 2020 11:02:54 +0200 (CEST)
From: Roland Lutz <rlutz AT hedmen DOT org>
To: "Glenn (glimrick AT epilitimus DOT com) [via geda-user AT delorie DOT com]" <geda-user AT delorie DOT com>
Subject: Re: [geda-user] submitted a new patch
In-Reply-To: <14f9e862-8ee0-4432-23b6-06e94215baa4@epilitimus.com>
Message-ID: <alpine.DEB.2.21.2010120958150.2535@nimbus>
References: <14f9e862-8ee0-4432-23b6-06e94215baa4 AT epilitimus DOT com>
User-Agent: Alpine 2.21 (DEB 202 2017-01-01)
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.

--8323329-1373840269-1602493374=:2535
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8BIT

Hi Glenn,

On Sun, 11 Oct 2020, Glenn (glimrick AT epilitimus DOT com) [via 
geda-user AT delorie DOT com] wrote:
> I just submitted a patch to launchpad as requested by the HACKING document
>
>  Added a user defined title to spice netlists Edit
> Bug #1899386

thank you for your contribution!  I applied your patch to the `master' 
branch.

As you may be aware, gEDA/gaf is in a transition from legacy Guile netlist 
backends to Python netlist backends.  I applied your change to the 
corresponding new backend (gnet_spice_sdb.py):

     for package in reversed(packages):
         if package.get_attribute('device', None) == 'spice-title':
             title = package.get_attribute('value', None)
             if title is None:
                 continue
             f.write(title + '\n')
             break

This iterates over all packages (in reversed order for compatibility with 
the old netlister), getting the 'device' attribute from each package, or 
None if the package doesn't have this attribute.  If the device is 
'spice-title' and the 'value' attribute is set, writes the title to the 
netlist file.  After writing the first title, it stops.

You can run the Python backend instead of the Guile backend by specifying 
`-p spice-sdb' instead of `-g spice-sdb' on the commmand line.

For new contributions, the preferred way is changing the Python backends 
directly (though simple changes to the Guile backends are accepted, as 
well).

Roland

--8323329-1373840269-1602493374=:2535--

- Raw text -


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