X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f X-Recipient: geda-user AT delorie DOT com X-TCPREMOTEIP: 207.224.51.38 X-Authenticated-UID: jpd AT noqsi DOT com Content-Type: multipart/signed; boundary="Apple-Mail=_01BE7AA2-8F00-4104-A9B2-5EA2540BEC8D"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: [geda-user] Can an attribute be attached to text for later inclusion in gnetlist backend? X-Pgp-Agent: GPGMail From: John Doty In-Reply-To: Date: Mon, 22 Aug 2016 14:55:08 -0600 Message-Id: References: To: geda-user AT delorie DOT com X-Mailer: Apple Mail (2.1878.6) 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 Precedence: bulk --Apple-Mail=_01BE7AA2-8F00-4104-A9B2-5EA2540BEC8D Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On Aug 22, 2016, at 2:16 PM, Svenn Are Bjerkem = (svenn DOT bjerkem AT googlemail DOT com) [via geda-user AT delorie DOT com] = wrote: > Hi, > I wonder if there is a way to attach an attribute to a block of text > in gschem so that I can pick it out in the gnetlist backend. You cannot, but attributes that aren=92t attached to anything may be = retrieved via (gnetlist:get-toplevel-attribute attribute). >=20 > Wanted to see if I could get the standard >=20 > library ieee; > use ieee.std_logic_1164.all; > use ieee.numeric_std.all; >=20 > through to a gnetlist backend The back end at https://github.com/noqsi/gnet-spice-noqsi uses toplevel = attributes =93spice-prolog=94 and =93spice-epilog=94 for the analogous = purpose in SPICE. It uses this function: ;; Include "cards" from appropriate toplevel attributes. (define (process-toplevel attr) (let ((t (gnetlist:get-toplevel-attribute attr))) (or (equal? t "not found") (collect-card (expand-string #f t))))) >=20 > Rationale is to > a) edit the template for files using other libraries > b) be able to do it fast and quick (text has multiline input) Attributes can be multiline, although initial creation may be subtle. = Text containing an =3D sign is an attribute as far as gnetlist is = concerned. > c) have it visible (or invisible) in the schematic depending on taste For fancy visibility of a multiline attribute: 1. Make a single line attribute, adjust its visibility flags. 2. Edit as text. This could be a little smoother, but it works. >=20 > -- > Svenn >=20 John Doty Noqsi Aerospace, Ltd. http://www.noqsi.com/ jpd AT noqsi DOT com --Apple-Mail=_01BE7AA2-8F00-4104-A9B2-5EA2540BEC8D Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJXu2atAAoJEF1Aj/0UKykRTWgP/0f2mab5uIVBi7RSewt4AIrG QWVDDlRw1CoLQxCF8OsqkNpYz3lN+6/5yxWFQWvLH+Vl7Y+QaFFAQFNb9daXHy7x 4VQUpeVEC9QVXNTdyfV+KFcN659na7adUzG9UO4wQMwczdUkM6bJ3xov1iZvDTYf d1bm7RBHqsVMm9ChNW0+U4nL+gof6jyA7F0AX9Gu+LeuDPiLLhBDTumfdJ6ideRX rxVokJH8LSkkzguGOCt+Po9f2jFy2l5mrIiekAEkc6Eqwc861OEjeKViK4m3lKvv rin3N1QYOkbUd13rqBpaAGsVoWCXeFHS4Uaupo1VWxqLqg07y1JqB9e7cOefoQqo Yov0N5g0b0sebCp2GX1fPsTCUCZvzKH7sRJ/OIl0DdvvV9XW8TCLhke7nM1D81oB YCYlGp+ZNFyocEaKMzgRDBLMMtmgzLQBfLaxnqcQIW4DpLtqbx0wlk8AODDzriVM UMG9E6J4JRIoKPfxipHpNDj7t7fJ5I4vNEkMX08g6ae91MorWXCbbJZiPLU8sGan wFqYgAUKurQlcR3p3TnMJwn+vaf4CfHihKYi7DS7MToV/K219wQuDOMCiT78tkHa RqVxvd2kboWuqwbS7lw7xIuxvCb8J8162ikilF+OCJsGflM8d929l46N2Xe4kJm2 EanzIZNp778Xw9odyosm =A0bc -----END PGP SIGNATURE----- --Apple-Mail=_01BE7AA2-8F00-4104-A9B2-5EA2540BEC8D--