bcf-api-xml 0.4.17__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.
Files changed (28) hide show
  1. {bcf_api_xml-0.4.17 → bcf_api_xml-0.4.18}/PKG-INFO +1 -1
  2. {bcf_api_xml-0.4.17 → bcf_api_xml-0.4.18}/bcf_api_xml/__init__.py +1 -1
  3. {bcf_api_xml-0.4.17 → bcf_api_xml-0.4.18}/bcf_api_xml/export/excel.py +20 -20
  4. {bcf_api_xml-0.4.17 → bcf_api_xml-0.4.18}/pyproject.toml +1 -1
  5. {bcf_api_xml-0.4.17 → bcf_api_xml-0.4.18}/README.md +0 -0
  6. {bcf_api_xml-0.4.17 → bcf_api_xml-0.4.18}/bcf_api_xml/Schemas/bcf.version +0 -0
  7. {bcf_api_xml-0.4.17 → bcf_api_xml-0.4.18}/bcf_api_xml/Schemas/markup.xsd +0 -0
  8. {bcf_api_xml-0.4.17 → bcf_api_xml-0.4.18}/bcf_api_xml/Schemas/project.xsd +0 -0
  9. {bcf_api_xml-0.4.17 → bcf_api_xml-0.4.18}/bcf_api_xml/Schemas/version.xsd +0 -0
  10. {bcf_api_xml-0.4.17 → bcf_api_xml-0.4.18}/bcf_api_xml/Schemas/visinfo.xsd +0 -0
  11. {bcf_api_xml-0.4.17 → bcf_api_xml-0.4.18}/bcf_api_xml/errors.py +0 -0
  12. {bcf_api_xml-0.4.17 → bcf_api_xml-0.4.18}/bcf_api_xml/export/__init__.py +0 -0
  13. {bcf_api_xml-0.4.17 → bcf_api_xml-0.4.18}/bcf_api_xml/export/zip.py +0 -0
  14. {bcf_api_xml-0.4.17 → bcf_api_xml-0.4.18}/bcf_api_xml/import_zip.py +0 -0
  15. {bcf_api_xml-0.4.17 → bcf_api_xml-0.4.18}/bcf_api_xml/models/ClippingPlane.py +0 -0
  16. {bcf_api_xml-0.4.17 → bcf_api_xml-0.4.18}/bcf_api_xml/models/Color.py +0 -0
  17. {bcf_api_xml-0.4.17 → bcf_api_xml-0.4.18}/bcf_api_xml/models/Comment.py +0 -0
  18. {bcf_api_xml-0.4.17 → bcf_api_xml-0.4.18}/bcf_api_xml/models/Component.py +0 -0
  19. {bcf_api_xml-0.4.17 → bcf_api_xml-0.4.18}/bcf_api_xml/models/Line.py +0 -0
  20. {bcf_api_xml-0.4.17 → bcf_api_xml-0.4.18}/bcf_api_xml/models/OrthogonalCamera.py +0 -0
  21. {bcf_api_xml-0.4.17 → bcf_api_xml-0.4.18}/bcf_api_xml/models/PerspectiveCamera.py +0 -0
  22. {bcf_api_xml-0.4.17 → bcf_api_xml-0.4.18}/bcf_api_xml/models/Topic.py +0 -0
  23. {bcf_api_xml-0.4.17 → bcf_api_xml-0.4.18}/bcf_api_xml/models/ViewSetupHints.py +0 -0
  24. {bcf_api_xml-0.4.17 → bcf_api_xml-0.4.18}/bcf_api_xml/models/Viewpoint.py +0 -0
  25. {bcf_api_xml-0.4.17 → bcf_api_xml-0.4.18}/bcf_api_xml/models/Visibility.py +0 -0
  26. {bcf_api_xml-0.4.17 → bcf_api_xml-0.4.18}/bcf_api_xml/models/VisualizationInfo.py +0 -0
  27. {bcf_api_xml-0.4.17 → bcf_api_xml-0.4.18}/bcf_api_xml/models/XYZ.py +0 -0
  28. {bcf_api_xml-0.4.17 → bcf_api_xml-0.4.18}/bcf_api_xml/models/__init__.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: bcf-api-xml
3
- Version: 0.4.17
3
+ Version: 0.4.18
4
4
  Summary: Convert BCF-API to BCF-XML
5
5
  Home-page: https://github.com/bimdata/BCF-API-XML-translator
6
6
  License: MIT
@@ -4,4 +4,4 @@ from bcf_api_xml.export import to_xlsx # noqa: F401
4
4
  from bcf_api_xml.export import to_zip # noqa: F401
5
5
  from bcf_api_xml.import_zip import to_json # noqa: F401
6
6
 
7
- __version__ = "0.4.17"
7
+ __version__ = "0.4.18"
@@ -13,7 +13,7 @@ def col_to_letter(index):
13
13
  return string.ascii_uppercase[index]
14
14
 
15
15
 
16
- HEADER_TRANSLATIONS = {
16
+ I18N_TRANSLATIONS = {
17
17
  "en": {
18
18
  "index": "Index",
19
19
  "creation_date": "Date",
@@ -49,7 +49,7 @@ HEADER_TRANSLATIONS = {
49
49
  "viewpoint": "Image",
50
50
  "models": "Maquettes",
51
51
  "space": "Organisation",
52
- "project": "Project",
52
+ "project": "Projet",
53
53
  "sheetname": "Liste des BCF",
54
54
  },
55
55
  }
@@ -89,14 +89,14 @@ def to_xlsx(
89
89
  comments: dict(topics_guid=[comment])
90
90
  viewpoints: dict(topics_guid=[viewpoint])
91
91
  """
92
- headers = HEADER_TRANSLATIONS[lang]
92
+ i18n = I18N_TRANSLATIONS[lang]
93
93
 
94
94
  xls_file = io.BytesIO()
95
95
  with xlsxwriter.Workbook(xls_file, options={"remove_timezone": True}) as workbook:
96
96
  if sheetname:
97
97
  worksheet = workbook.add_worksheet(sheetname)
98
98
  else:
99
- worksheet = workbook.add_worksheet(headers["sheetname"])
99
+ worksheet = workbook.add_worksheet(i18n["sheetname"])
100
100
 
101
101
  # Set default height for tables
102
102
  DEFAULT_CELL_HEIGHT = 220
@@ -192,14 +192,14 @@ def to_xlsx(
192
192
  row += 1
193
193
  worksheet.set_row_pixels(row, ROW_HEIGHT)
194
194
  worksheet.merge_range("A3:B3", "", merge_format_default)
195
- worksheet.write(row, 0, headers["project"], header_fmt)
195
+ worksheet.write(row, 0, i18n["project"], header_fmt)
196
196
  worksheet.merge_range(f"C3:{LAST_USED_COL_LETTER}3", "", merge_format_default)
197
197
  worksheet.write(row, 2, project["name"], header_fmt2)
198
198
 
199
199
  row += 1
200
200
  worksheet.set_row_pixels(row, ROW_HEIGHT)
201
201
  worksheet.merge_range("A4:B4", "", merge_format_default)
202
- worksheet.write(row, 0, headers["space"], header_fmt)
202
+ worksheet.write(row, 0, i18n["space"], header_fmt)
203
203
  worksheet.merge_range(f"C4:{LAST_USED_COL_LETTER}4", "", merge_format_default)
204
204
  worksheet.write(row, 2, space["name"], header_fmt2)
205
205
 
@@ -223,23 +223,23 @@ def to_xlsx(
223
223
  worksheet.set_row(row, TABLE_HEADER_HEIGHT)
224
224
 
225
225
  # Create table header
226
- worksheet.write(row, INDEX_COL_INDEX, headers["index"], header_fmt)
227
- worksheet.write(row, CREATION_DATE_COL_INDEX, headers["creation_date"], header_fmt)
226
+ worksheet.write(row, INDEX_COL_INDEX, i18n["index"], header_fmt)
227
+ worksheet.write(row, CREATION_DATE_COL_INDEX, i18n["creation_date"], header_fmt)
228
228
  worksheet.set_column_pixels(CREATION_DATE_COL_INDEX, CREATION_DATE_COL_INDEX, 100)
229
- worksheet.write(row, AUTHOR_COL_INDEX, headers["author"], header_fmt)
230
- worksheet.write(row, ASSIGNED_TO_COL_INDEX, headers["assigned_to"], header_fmt)
231
- worksheet.write(row, TITLE_COL_INDEX, headers["title"], header_fmt)
232
- worksheet.write(row, VIEWPOINT_COL_INDEX, headers["viewpoint"], header_fmt)
233
- worksheet.write(row, DESCRIPTION_COL_INDEX, headers["description"], header_fmt)
234
- worksheet.write(row, DUE_DATE_COL_INDEX, headers["due_date"], header_fmt)
235
- worksheet.write(row, STAGE_COL_INDEX, headers["stage"], header_fmt)
236
- worksheet.write(row, STATUS_COL_INDEX, headers["status"], header_fmt)
237
- worksheet.write(row, PRIORITY_COL_INDEX, headers["priority"], header_fmt)
238
- worksheet.write(row, LABELS_COL_INDEX, headers["tags"], header_fmt)
239
- worksheet.write(row, COMMENTS_COL_INDEX, headers["comments"], header_fmt)
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)
240
240
  worksheet.set_column_pixels(LABELS_COL_INDEX, LABELS_COL_INDEX, 100)
241
241
  worksheet.set_column_pixels(COMMENTS_COL_INDEX, COMMENTS_COL_INDEX, 200)
242
- worksheet.write(row, MODELS_COL_INDEX, headers["models"], header_fmt)
242
+ worksheet.write(row, MODELS_COL_INDEX, i18n["models"], header_fmt)
243
243
  row += 1
244
244
 
245
245
  # Sort topic by index
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "bcf-api-xml"
3
- version = "0.4.17"
3
+ version = "0.4.18"
4
4
  description = "Convert BCF-API to BCF-XML"
5
5
  authors = ["Hugo Duroux <hugo@bimdata.io>"]
6
6
  license = "MIT"
File without changes