File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77@author: zehl
88"""
99
10+ import datetime
11+ import os
12+ import odml
1013import sys
14+
15+
1116if len (sys .argv ) != 2 :
12- print ("You have to provide the absolute path to the odml-python module " ,
13- "your command line." )
14- else :
15- odml_pythonpath = sys .argv [- 1 ]
16- sys .path .append (odml_pythonpath )
17+ print ("Please provide an existing directory for the example odml file." )
18+ quit ()
1719
18- import os
19- import odml
20- import datetime
20+ output_directory = sys .argv [- 1 ]
21+ if not os .path .isdir (output_directory ):
22+ print ("Please provide an existing directory for the example odml file." )
23+ quit ()
2124
25+ save_to = os .path .join (output_directory , "THGTTG.odml" )
2226
2327odmlrepo = 'http://portal.g-node.org/odml/terminologies/v1.0/terminologies.xml'
2428
304308 dtype = odml .DType .string ,
305309 definition = "Manufacturer of robots" ))
306310
307- save_to = os .path .join (odml_pythonpath , "doc" , "example_odMLs" , "THGTTG.odml" )
308-
309311odml .save (doc , save_to )
310312
You can’t perform that action at this time.
0 commit comments