Mail Archives: geda-user/2014/05/08/08:11:56
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-1399905839-1399550834=:22756
Content-Type: TEXT/PLAIN; format=flowed; charset=UTF-8
Content-Transfer-Encoding: 8BIT
Hi,
check out this new library I made:
http://hedmen.org/xorn/xorn-0.0.tar.gz
On the surface, it's just a library to read and write gEDA files. The
interesting part however is that it allows different programs—e.g., Python
scripts and a GUI application—to work on the same objects. In an
application that is based on Xorn, you could just run your favorite script
in a Python console and watch the objects being moved around. I designed
it to work with Xi, but it should be possible to integrate it with gschem,
too.
There is also a command-line utility with two sub-commands:
xorn extract - extract embedded symbols or pixmaps from a schematic
xorn find-symbol-by-pinout - pretty much self-explaining
Here is an example how a Python script using Xorn looks like:
> from xorn.geda.read import read
> from xorn.geda.write import write
> from xorn.geda.attrib import search_attached
>
> sch = read('example.sch')
>
> for ob in sch.toplevel_objects():
> if 'R1' in search_attached(ob, 'refdes'):
> sch.delete_object(ob)
>
> write(sch, 'example-without-R1.sch')
The API documentation is available here:
http://hedmen.org/xorn/doc/api/html/
For a list of known bugs and issues, see:
http://bugs.hedmen.org/?project=2
Roland
--8323329-1399905839-1399550834=:22756--
- Raw text -