diff --git a/tools/export-all-parts.py b/tools/export-all-parts.py index c819107..93b47b3 100644 --- a/tools/export-all-parts.py +++ b/tools/export-all-parts.py @@ -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: