Hi all,

I just thought I'd mention on-list, a tool I was working on for gEDA. I
was hoping to add some hierarchy support into xgsch2pcb, so when I place
the root schematic for my design, it can "figure out" that I have
source= attributes, and that other schematics are in play. This should
provide useful glue for the project manager in the future.

I started looking to write a libgeda binding for Python, but
unfortunately, since libgeda uses GUILE (and GUILE takes over your app's
process flow - EVIL), I can't do that.

The second attempt was to write a simple python gafrc parser, and had
started work on the gEDA format parser when I realised this was all too
horrible.

Third attempt (hopefully the sane one this time), was to write a C
command line utility which can query the information from the schematic.
Since we might want to ask several "questions", this program can also
use DBus, and act as a daemon serving this data out - meaning less
forking and re-loading of schematics for a plurality of queries.

My first stab at semantics so far (command line querying only for now):

Usage:
  ./geda-query [OPTION]... <COMMAND> [FILE]...

Help options:
  -h, --help                Display this usage information

Options:
  -q, --quiet               Quiet mode on
  -v, --verbose             Verbose mode on

Commands:
  -d, --dbus                Respond to queries via DBus IPC
  -s, --symbols             Print symbols used in the file(s)
  -S, --sources             Print sources referenced by the file(s)
      --symbol-paths        Print searched symbol library paths
      --source-paths        Print searched source library paths


E.g.:

./geda-query -qs test.sch
title-bordered-A2.sym
aop-std-1.sym
battery-1.sym
connector3-2.sym

./geda-query -qS test.sch
battery_file1.sch
battery_file2.sch
bogus_test.sch
battery_file1.sch
battery_file2.sch
connector_fake.sch

(I still need to add code to work with multiple passed schematics and
produce a unique list of sources / symbols to test).

The intention is that the gafrc search paths which become active when
loading a particular schematic should also be retrievable, as this could
be more useful information for the project manger.


Any thoughts for further questions we might want to ask it?

The code is here:
http://repo.or.cz/w/geda-gaf/pcjc2.git?a=shortlog;h=refs/heads/master_comp2

Ignore the DBus stuff for now, its not finished, and currently has an
API set copy-pasted from a data-logging program I wrote a while back.


Best wishes,

Peter Clifton




_______________________________________________
geda-dev mailing list
[email protected]
http://www.seul.org/cgi-bin/mailman/listinfo/geda-dev

Reply via email to