Update Doors_Schedule.py
Browse files- Doors_Schedule.py +6 -6
Doors_Schedule.py
CHANGED
|
@@ -1501,10 +1501,10 @@ def save_multiple_annotations_count_bax(annotations, output_path, column_order,p
|
|
| 1501 |
annotation_xml.find('Page').text = str(page_index+1) ## adjusted for page handling
|
| 1502 |
page.append(annotation_xml)
|
| 1503 |
|
| 1504 |
-
pretty_xml = parseString(tostring(doc)).toprettyxml(indent=" ")
|
| 1505 |
-
with open(output_path, 'w', encoding='utf-8') as f:
|
| 1506 |
-
|
| 1507 |
-
|
| 1508 |
print(f"Saved {len(annotations)} annotations to {output_path}")
|
| 1509 |
return pretty_xml
|
| 1510 |
|
|
@@ -1816,6 +1816,6 @@ def mainRun(schedule, plan, searcharray):
|
|
| 1816 |
v='stroke'
|
| 1817 |
x,y,z=int(annot_color.get(v)[0]*255),int(annot_color.get(v)[1]*255),int(annot_color.get(v)[2]*255)
|
| 1818 |
list1.loc[len(list1)] =[annot.info['content'],annot.info['id'],annot.info['subject'],[x,y,z]]
|
| 1819 |
-
return annotatedimgs,
|
| 1820 |
-
|
| 1821 |
# return annotatedimg, doc2 , list1, repeated_labels , not_found
|
|
|
|
| 1501 |
annotation_xml.find('Page').text = str(page_index+1) ## adjusted for page handling
|
| 1502 |
page.append(annotation_xml)
|
| 1503 |
|
| 1504 |
+
# pretty_xml = parseString(tostring(doc)).toprettyxml(indent=" ")
|
| 1505 |
+
# with open(output_path, 'w', encoding='utf-8') as f:
|
| 1506 |
+
# f.write(pretty_xml)
|
| 1507 |
+
pretty_xml= tostring(doc, encoding="unicode", method="xml")
|
| 1508 |
print(f"Saved {len(annotations)} annotations to {output_path}")
|
| 1509 |
return pretty_xml
|
| 1510 |
|
|
|
|
| 1816 |
v='stroke'
|
| 1817 |
x,y,z=int(annot_color.get(v)[0]*255),int(annot_color.get(v)[1]*255),int(annot_color.get(v)[2]*255)
|
| 1818 |
list1.loc[len(list1)] =[annot.info['content'],annot.info['id'],annot.info['subject'],[x,y,z]]
|
| 1819 |
+
return annotatedimgs, doc2 , list1, repeated_labels , not_found, pretty_xml, column_xml
|
| 1820 |
+
|
| 1821 |
# return annotatedimg, doc2 , list1, repeated_labels , not_found
|