diff options
author | Tim O'Shea <tim.oshea753@gmail.com> | 2012-09-26 14:18:30 -0400 |
---|---|---|
committer | Johnathan Corgan <johnathan@corganlabs.com> | 2012-09-28 10:10:19 -0700 |
commit | 515d1b6f91f5dd28997525b1e88006bbfc0f170a (patch) | |
tree | d74ed839dc9349c47343613af7685ed12c01f89b /grc/python | |
parent | a07fe1904412af78b3d70a6225e6efe10c9efbe5 (diff) |
added the ability to open custom GRC hier block definitions from graphs using an instance of them
Diffstat (limited to 'grc/python')
-rw-r--r-- | grc/python/block.dtd | 3 | ||||
-rw-r--r-- | grc/python/convert_hier.py | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/grc/python/block.dtd b/grc/python/block.dtd index 41a744d07a..292ea06cb6 100644 --- a/grc/python/block.dtd +++ b/grc/python/block.dtd @@ -25,7 +25,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA Top level element. A block contains a name, ...parameters list, and list of IO ports. --> -<!ELEMENT block (name, key, category?, throttle?, import*, var_make?, make, callback*, param*, check*, sink*, source*, doc?)> +<!ELEMENT block (name, key, category?, throttle?, import*, var_make?, make, callback*, param*, check*, sink*, source*, doc?, grc_source?)> <!-- Sub level elements. --> @@ -40,6 +40,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA <!ELEMENT category (#PCDATA)> <!ELEMENT import (#PCDATA)> <!ELEMENT doc (#PCDATA)> +<!ELEMENT grc_source (#PCDATA)> <!ELEMENT name (#PCDATA)> <!ELEMENT key (#PCDATA)> <!ELEMENT check (#PCDATA)> diff --git a/grc/python/convert_hier.py b/grc/python/convert_hier.py index c6ca5b7692..f4d082d596 100644 --- a/grc/python/convert_hier.py +++ b/grc/python/convert_hier.py @@ -73,6 +73,7 @@ def convert_hier(flow_graph, python_file): block_n['source'].append(source_n) #doc data block_n['doc'] = "%s\n%s\n%s"%(block_author, block_desc, python_file) + block_n['grc_source'] = "%s"%(flow_graph.grc_file_path) #write the block_n to file xml_file = python_file + '.xml' ParseXML.to_file({'block': block_n}, xml_file) |