From 51d473bf50233c154aa9ef1d9af66443dcc66732 Mon Sep 17 00:00:00 2001 From: Youen Date: Fri, 12 May 2023 21:57:02 +0200 Subject: [PATCH] Modified export script to ignore experimental parts --- tools/export-all-parts.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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: