bcf-api-xml 0.4.16__tar.gz → 0.4.18__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {bcf_api_xml-0.4.16 → bcf_api_xml-0.4.18}/PKG-INFO +1 -1
- {bcf_api_xml-0.4.16 → bcf_api_xml-0.4.18}/bcf_api_xml/__init__.py +1 -1
- {bcf_api_xml-0.4.16 → bcf_api_xml-0.4.18}/bcf_api_xml/export/excel.py +23 -21
- {bcf_api_xml-0.4.16 → bcf_api_xml-0.4.18}/pyproject.toml +1 -1
- {bcf_api_xml-0.4.16 → bcf_api_xml-0.4.18}/README.md +0 -0
- {bcf_api_xml-0.4.16 → bcf_api_xml-0.4.18}/bcf_api_xml/Schemas/bcf.version +0 -0
- {bcf_api_xml-0.4.16 → bcf_api_xml-0.4.18}/bcf_api_xml/Schemas/markup.xsd +0 -0
- {bcf_api_xml-0.4.16 → bcf_api_xml-0.4.18}/bcf_api_xml/Schemas/project.xsd +0 -0
- {bcf_api_xml-0.4.16 → bcf_api_xml-0.4.18}/bcf_api_xml/Schemas/version.xsd +0 -0
- {bcf_api_xml-0.4.16 → bcf_api_xml-0.4.18}/bcf_api_xml/Schemas/visinfo.xsd +0 -0
- {bcf_api_xml-0.4.16 → bcf_api_xml-0.4.18}/bcf_api_xml/errors.py +0 -0
- {bcf_api_xml-0.4.16 → bcf_api_xml-0.4.18}/bcf_api_xml/export/__init__.py +0 -0
- {bcf_api_xml-0.4.16 → bcf_api_xml-0.4.18}/bcf_api_xml/export/zip.py +0 -0
- {bcf_api_xml-0.4.16 → bcf_api_xml-0.4.18}/bcf_api_xml/import_zip.py +0 -0
- {bcf_api_xml-0.4.16 → bcf_api_xml-0.4.18}/bcf_api_xml/models/ClippingPlane.py +0 -0
- {bcf_api_xml-0.4.16 → bcf_api_xml-0.4.18}/bcf_api_xml/models/Color.py +0 -0
- {bcf_api_xml-0.4.16 → bcf_api_xml-0.4.18}/bcf_api_xml/models/Comment.py +0 -0
- {bcf_api_xml-0.4.16 → bcf_api_xml-0.4.18}/bcf_api_xml/models/Component.py +0 -0
- {bcf_api_xml-0.4.16 → bcf_api_xml-0.4.18}/bcf_api_xml/models/Line.py +0 -0
- {bcf_api_xml-0.4.16 → bcf_api_xml-0.4.18}/bcf_api_xml/models/OrthogonalCamera.py +0 -0
- {bcf_api_xml-0.4.16 → bcf_api_xml-0.4.18}/bcf_api_xml/models/PerspectiveCamera.py +0 -0
- {bcf_api_xml-0.4.16 → bcf_api_xml-0.4.18}/bcf_api_xml/models/Topic.py +0 -0
- {bcf_api_xml-0.4.16 → bcf_api_xml-0.4.18}/bcf_api_xml/models/ViewSetupHints.py +0 -0
- {bcf_api_xml-0.4.16 → bcf_api_xml-0.4.18}/bcf_api_xml/models/Viewpoint.py +0 -0
- {bcf_api_xml-0.4.16 → bcf_api_xml-0.4.18}/bcf_api_xml/models/Visibility.py +0 -0
- {bcf_api_xml-0.4.16 → bcf_api_xml-0.4.18}/bcf_api_xml/models/VisualizationInfo.py +0 -0
- {bcf_api_xml-0.4.16 → bcf_api_xml-0.4.18}/bcf_api_xml/models/XYZ.py +0 -0
- {bcf_api_xml-0.4.16 → bcf_api_xml-0.4.18}/bcf_api_xml/models/__init__.py +0 -0
@@ -13,7 +13,7 @@ def col_to_letter(index):
|
|
13
13
|
return string.ascii_uppercase[index]
|
14
14
|
|
15
15
|
|
16
|
-
|
16
|
+
I18N_TRANSLATIONS = {
|
17
17
|
"en": {
|
18
18
|
"index": "Index",
|
19
19
|
"creation_date": "Date",
|
@@ -31,6 +31,7 @@ HEADER_TRANSLATIONS = {
|
|
31
31
|
"models": "Models",
|
32
32
|
"space": "Organisation",
|
33
33
|
"project": "Project",
|
34
|
+
"sheetname": "BCF list",
|
34
35
|
},
|
35
36
|
"fr": {
|
36
37
|
"index": "N°",
|
@@ -48,7 +49,8 @@ HEADER_TRANSLATIONS = {
|
|
48
49
|
"viewpoint": "Image",
|
49
50
|
"models": "Maquettes",
|
50
51
|
"space": "Organisation",
|
51
|
-
"project": "
|
52
|
+
"project": "Projet",
|
53
|
+
"sheetname": "Liste des BCF",
|
52
54
|
},
|
53
55
|
}
|
54
56
|
|
@@ -87,12 +89,14 @@ def to_xlsx(
|
|
87
89
|
comments: dict(topics_guid=[comment])
|
88
90
|
viewpoints: dict(topics_guid=[viewpoint])
|
89
91
|
"""
|
92
|
+
i18n = I18N_TRANSLATIONS[lang]
|
93
|
+
|
90
94
|
xls_file = io.BytesIO()
|
91
95
|
with xlsxwriter.Workbook(xls_file, options={"remove_timezone": True}) as workbook:
|
92
96
|
if sheetname:
|
93
97
|
worksheet = workbook.add_worksheet(sheetname)
|
94
98
|
else:
|
95
|
-
worksheet = workbook.add_worksheet()
|
99
|
+
worksheet = workbook.add_worksheet(i18n["sheetname"])
|
96
100
|
|
97
101
|
# Set default height for tables
|
98
102
|
DEFAULT_CELL_HEIGHT = 220
|
@@ -136,8 +140,6 @@ def to_xlsx(
|
|
136
140
|
header_fmt2 = workbook.add_format({"border": 1})
|
137
141
|
base_fm_align = workbook.add_format({"align": "center", "valign": "top"})
|
138
142
|
|
139
|
-
headers = HEADER_TRANSLATIONS[lang]
|
140
|
-
|
141
143
|
# Company Logo followed by date, espace, space, models
|
142
144
|
row = 0
|
143
145
|
|
@@ -190,14 +192,14 @@ def to_xlsx(
|
|
190
192
|
row += 1
|
191
193
|
worksheet.set_row_pixels(row, ROW_HEIGHT)
|
192
194
|
worksheet.merge_range("A3:B3", "", merge_format_default)
|
193
|
-
worksheet.write(row, 0,
|
195
|
+
worksheet.write(row, 0, i18n["project"], header_fmt)
|
194
196
|
worksheet.merge_range(f"C3:{LAST_USED_COL_LETTER}3", "", merge_format_default)
|
195
197
|
worksheet.write(row, 2, project["name"], header_fmt2)
|
196
198
|
|
197
199
|
row += 1
|
198
200
|
worksheet.set_row_pixels(row, ROW_HEIGHT)
|
199
201
|
worksheet.merge_range("A4:B4", "", merge_format_default)
|
200
|
-
worksheet.write(row, 0,
|
202
|
+
worksheet.write(row, 0, i18n["space"], header_fmt)
|
201
203
|
worksheet.merge_range(f"C4:{LAST_USED_COL_LETTER}4", "", merge_format_default)
|
202
204
|
worksheet.write(row, 2, space["name"], header_fmt2)
|
203
205
|
|
@@ -221,23 +223,23 @@ def to_xlsx(
|
|
221
223
|
worksheet.set_row(row, TABLE_HEADER_HEIGHT)
|
222
224
|
|
223
225
|
# Create table header
|
224
|
-
worksheet.write(row, INDEX_COL_INDEX,
|
225
|
-
worksheet.write(row, CREATION_DATE_COL_INDEX,
|
226
|
+
worksheet.write(row, INDEX_COL_INDEX, i18n["index"], header_fmt)
|
227
|
+
worksheet.write(row, CREATION_DATE_COL_INDEX, i18n["creation_date"], header_fmt)
|
226
228
|
worksheet.set_column_pixels(CREATION_DATE_COL_INDEX, CREATION_DATE_COL_INDEX, 100)
|
227
|
-
worksheet.write(row, AUTHOR_COL_INDEX,
|
228
|
-
worksheet.write(row, ASSIGNED_TO_COL_INDEX,
|
229
|
-
worksheet.write(row, TITLE_COL_INDEX,
|
230
|
-
worksheet.write(row, VIEWPOINT_COL_INDEX,
|
231
|
-
worksheet.write(row, DESCRIPTION_COL_INDEX,
|
232
|
-
worksheet.write(row, DUE_DATE_COL_INDEX,
|
233
|
-
worksheet.write(row, STAGE_COL_INDEX,
|
234
|
-
worksheet.write(row, STATUS_COL_INDEX,
|
235
|
-
worksheet.write(row, PRIORITY_COL_INDEX,
|
236
|
-
worksheet.write(row, LABELS_COL_INDEX,
|
237
|
-
worksheet.write(row, COMMENTS_COL_INDEX,
|
229
|
+
worksheet.write(row, AUTHOR_COL_INDEX, i18n["author"], header_fmt)
|
230
|
+
worksheet.write(row, ASSIGNED_TO_COL_INDEX, i18n["assigned_to"], header_fmt)
|
231
|
+
worksheet.write(row, TITLE_COL_INDEX, i18n["title"], header_fmt)
|
232
|
+
worksheet.write(row, VIEWPOINT_COL_INDEX, i18n["viewpoint"], header_fmt)
|
233
|
+
worksheet.write(row, DESCRIPTION_COL_INDEX, i18n["description"], header_fmt)
|
234
|
+
worksheet.write(row, DUE_DATE_COL_INDEX, i18n["due_date"], header_fmt)
|
235
|
+
worksheet.write(row, STAGE_COL_INDEX, i18n["stage"], header_fmt)
|
236
|
+
worksheet.write(row, STATUS_COL_INDEX, i18n["status"], header_fmt)
|
237
|
+
worksheet.write(row, PRIORITY_COL_INDEX, i18n["priority"], header_fmt)
|
238
|
+
worksheet.write(row, LABELS_COL_INDEX, i18n["tags"], header_fmt)
|
239
|
+
worksheet.write(row, COMMENTS_COL_INDEX, i18n["comments"], header_fmt)
|
238
240
|
worksheet.set_column_pixels(LABELS_COL_INDEX, LABELS_COL_INDEX, 100)
|
239
241
|
worksheet.set_column_pixels(COMMENTS_COL_INDEX, COMMENTS_COL_INDEX, 200)
|
240
|
-
worksheet.write(row, MODELS_COL_INDEX,
|
242
|
+
worksheet.write(row, MODELS_COL_INDEX, i18n["models"], header_fmt)
|
241
243
|
row += 1
|
242
244
|
|
243
245
|
# Sort topic by index
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|