mirror of
https://github.com/stevenrobertson/cuburn.git
synced 2025-02-05 11:40:04 -05:00
convert_file -> nodes_from_xml_path
This commit is contained in:
parent
3294ba10d6
commit
c4727a48fc
@ -172,7 +172,7 @@ def flam3_to_node(flame):
|
|||||||
n['type'] = 'node'
|
n['type'] = 'node'
|
||||||
return n
|
return n
|
||||||
|
|
||||||
def convert_file(path):
|
def nodes_from_xml_path(path):
|
||||||
"""Quick one-shot conversion for an XML genome."""
|
"""Quick one-shot conversion for an XML genome."""
|
||||||
flames = XMLGenomeParser.parse(open(path).read())
|
flames = XMLGenomeParser.parse(open(path).read())
|
||||||
if len(flames) > 10:
|
if len(flames) > 10:
|
||||||
@ -183,4 +183,4 @@ def convert_file(path):
|
|||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
import sys
|
import sys
|
||||||
print '\n\n'.join(map(to_json, convert_file(sys.argv[1])))
|
print '\n\n'.join(map(to_json, nodes_from_xml_path(sys.argv[1])))
|
||||||
|
Loading…
Reference in New Issue
Block a user