Mail Archives: geda-user/2020/10/12/05:23:05
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 -