Modified export script to ignore experimental parts
This commit is contained in:
parent
30b6743b62
commit
51d473bf50
1 changed files with 6 additions and 1 deletions
|
|
@ -24,7 +24,7 @@ def convert_file(file_name, output_format):
|
|||
if len(obj.Parents) == 0:
|
||||
#print(obj.Label)
|
||||
root_objects.append(obj)
|
||||
if obj.Label == doc.Name:
|
||||
if obj.Label == doc.Name or obj.Label == doc.Name + ' (experimental)':
|
||||
main_object = obj
|
||||
|
||||
if main_object is None and len(root_objects) == 1:
|
||||
|
|
@ -33,6 +33,11 @@ def convert_file(file_name, output_format):
|
|||
if main_object is None:
|
||||
raise Exception("Can't find main object in file " + file_name + " (found " + str(len(root_objects)) + " root object(s), none named like the document " + doc.Name + ")")
|
||||
|
||||
if 'experimental' in main_object.Label or 'expérimental' in main_object.Label:
|
||||
print('Document ' + doc.Name + ' is marked as experimental and will be ignored')
|
||||
close_all_docs()
|
||||
return
|
||||
|
||||
secondary_objects = []
|
||||
code_obj = doc.getObjectsByLabel('Code_Tube_Draft')
|
||||
if len(code_obj) == 1:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue