> Sounds like you've just invented a very awkward netlist and parts-list > format, with each line having an explicit verb ;)
Yup. That's what an action script is. We already have an action to load a netlist file, but that means we need not one but two files being spit out by gnetlist. Three if you want a file full of elements too, and then we'd have to invent a syntax for the element file. We already have a syntax for actions. You can also stream actions through stdin/dbus without needing a file at all. > There is of course functionality overlap between this and the existing > netlist import code, but I guess if they are using the same code-paths > underneath, that is fine. (I guess line-by-line processing of a netlist > file in various formats could translate to the same calls as this action > script). It also fixes one problem with the current netlister, which is, what to do if a given pin appears twice on a schematic. Under the hood, yeah, it just feeds the data into the same code the netlist file loader uses. > What is: > > ElementAddIf(C902,0.1uF,0603dj.fp) Add the element if it doesn't already exist. Updates it if it does. I haven't written the documentation yet, or finalized the actions. > Then you set attributes on it... if you're going with verbs, are you > intending to have a verb to clear existing attributes, or do attributes > which exist on an element, but not in the annotation file get kept? It will overwrite attributes with the same name, but ignore other attributes. The whole idea behind attributes it that they're data for third-party apps, so it's critical that you preserve attributes that aren't yours. I suppose a *ClearAttribute() action would be useful. Or you can add it with a value of "" to "remove" it. Hadn't thought that far ahead yet. At one point we suggested using "app:name" syntax to create "namespaces" in attribute-space for third party apps, to reduce the risk of name clash between apps. _______________________________________________ geda-dev mailing list [email protected] http://www.seul.org/cgi-bin/mailman/listinfo/geda-dev
