delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2019/09/02/13:18:49

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
X-Recipient: geda-user AT delorie DOT com
X-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20161025;
h=date:from:to:subject:message-id:mail-followup-to:references
:mime-version:content-disposition:content-transfer-encoding
:in-reply-to:user-agent;
bh=bM+SJPQ/lyR9fV3nATcUjoKCz6FYD/E7YM/cAH15NOg=;
b=mRJAb5tTyRybbdA6yRH4pFHZUen7eg+Fz7zFlCXWVdXyIFF8z4+3L57Gb7LzUhl7+G
Yuc9/Et0rP8bQKvIqSZrMmKxxdYgoV+eZYC4NUhYvHoDNeUE9RwCfEp4yO3FkOeeVXz1
hr0gOBsJl1fDiaC9rieUOLZr/SkdYMf2i+pNTN1EcmmQZF2M+Hm+U+s1x9nzh5hAP+fo
HeEU0N5VID1N16oYju2su/qRXbqfh7jG3QpJreb36DBiwBWvUQ/6xWiUbjk/2fU9HEoa
BszapeppLpREIgc21ffJhcSKMVopaLMg7W4wAg8Ckj3o3V0/3FHoO+5gL+4oME8b5O5/
kgeA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:date:from:to:subject:message-id:mail-followup-to
:references:mime-version:content-disposition
:content-transfer-encoding:in-reply-to:user-agent;
bh=bM+SJPQ/lyR9fV3nATcUjoKCz6FYD/E7YM/cAH15NOg=;
b=aWjQQWQK8WkChyglhuuvebfq0frDraDJBjID+bKOVrMeCD8NIgCb9xoU4lcgHodX1h
NKYImT6J8rXn+SQ6P1EdZpz1axLg+nN97/bYrGt/GooHenrJJqvQiaaHpzA+rcKqLAZ+
gP7/nNRKomht318Fh7Mo/dLTjwzWXogqyL7sdfrJeZw+TN0GTlRChQ3clLFEYsn5UjEi
kdEmMv28/YYNGR6uJHLDgD57s37BMUf3S8w5INkwNZ1CJiZgkfOdcVc3miD1lMDQEVAd
XIx2MahX85nYZm43BTv9VQ0B0GhUms3MGgGUx41wvp2uCgq9dP/G2FtMwYk2ZtLRb/ph
HThw==
X-Gm-Message-State: APjAAAUrlGA8ALYJsqFp3GgvfmGVY8FrzDUsGWHuFrTO1EHD8ndjs2GN
b6Vla5/sb9ZWbwJRhHjFezwvR1Pk
X-Google-Smtp-Source: APXvYqy6zWVTqksEYHOS6LvbRu0LM9u0BB1T9R3LX2srTleBo0WaMW51maGKyjICVdQc6C42soFRhA==
X-Received: by 2002:a19:6001:: with SMTP id u1mr17617820lfb.50.1567443444030;
Mon, 02 Sep 2019 09:57:24 -0700 (PDT)
Date: Mon, 2 Sep 2019 19:57:22 +0300
From: "Vladimir Zhbanov (vzhbanov AT gmail DOT com) [via geda-user AT delorie DOT com]" <geda-user AT delorie DOT com>
To: geda-user AT delorie DOT com
Subject: Re: [geda-user] gschem interaction from external processes
Message-ID: <20190902165721.GB1331@newvzh.lokolhoz>
Mail-Followup-To: geda-user AT delorie DOT com
References: <CAPp8_DqaZpOpdKFrUF7HC9sbCG2ag0a2iuWQrSkOY76U1kRQ6g AT mail DOT gmail DOT com>
MIME-Version: 1.0
In-Reply-To: <CAPp8_DqaZpOpdKFrUF7HC9sbCG2ag0a2iuWQrSkOY76U1kRQ6g@mail.gmail.com>
User-Agent: Mutt/1.10.1 (2018-07-13)
Note-from-DJ: This may be spam
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

Hi Matt,

On Mon, Sep 02, 2019 at 11:48:12AM +0100, Majenko Technologies (matt AT majenko DOT co DOT uk) [via geda-user AT delorie DOT com] wrote:
> I am attempting to build an integrated project management system based
> around gschem and PCB and associated tools. Something which integrates the
> tools together into a single workflow.
> 
> As part of this is an automated (by automated I mean you click one button
> in the interface) "Save open schematics and PCBs, Run gsch2pcb, Reload open
> schematics and PCBs from disk, Load new netlist and layout to buffer"
> operation.
> 
> Of course, part of that is getting gschem and PCB to save their files and
> "revert" from disk after files have been changed externally.  For PCB
> that's not a problem - I just launch it with --listen and I can interact to
> my heart's content.  gschem is a little harder though.
> 
> I have modified the code so that it responds to two signals, USR1 (save all
> pages) and USR2 (close and re-open all pages), and it (kind of) works (at
> the moment it's dumping random "untitled_1.sch" files around the place, but
> I can fix that...). I can't help feeling that it's a little clunky though,
> and am wondering if there is a better way of implementing it.
> 
> What would be ideal would be a "--listen" system like PCB has that would
> allow you to send SCM scripts directly to the running process. I don't know
> how any of that is implemented though, so have no clue if that would be
> practical or not.
> 
> So really I'm looking for ideas from people that are more familiar with the
> internals of gschem than I am...

AFAICS, you're working hard way on the C side of the code. In our
Lepton fork of geda-gaf [1] we're moving such work to the Scheme
side.

For example, there is a function `filename->page' in the (netlist
page) module, which is pretty simple and can be used to revert the
page you need (just three operations: save the file name of your
page, close the existing page, reopen it using `filename->page').
Moreover, the changes that will go in next release fix some of the
"untitled*.sch" issues, please see our NEWS [3].  There is also
some code implementing symbol caching (not sure it is relevant
here, so let me know if it is interesting for you).  Generally,
moving the work to the Scheme side would pretty much ease your
work :-)

HTH

[1] https://github.com/lepton-eda/lepton-eda
[2] https://github.com/lepton-eda/lepton-eda/blob/master/netlist/scheme/netlist/page.scm
[3] https://github.com/lepton-eda/lepton-eda/blob/master/NEWS.md
-- 
  Vladimir

(λ)επτόν EDA — https://github.com/lepton-eda

- Raw text -


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