isogeotoxlsx.isogeo2xlsx module¶
Get metadatas from Isogeo and store it into a Excel worksheet.
-
class
isogeotoxlsx.isogeo2xlsx.
Isogeo2xlsx
(lang='FR', url_base_edit='', url_base_view='', **kwargs)¶ Bases:
openpyxl.workbook.workbook.Workbook
Used to store Isogeo API results into an Excel worksheet (.xlsx)
- Parameters
lang (str) – selected language for output
url_base_edit (str) – base url to format edit links (basically app.isogeo.com)
url_base_view (str) – base url to format view links (basically open.isogeo.com)
-
column_width
(ws, columns)¶ Set the width of the columns of the passed worksheet.
- Parameters
ws (Worksheet) – worksheet into write headers
columns (ColumnPattern) – column table
-
headers_writer
(ws, columns)¶ Writes the headers from a columns ref table to a worksheet.
- Parameters
ws (Worksheet) – worksheet into write headers
columns (ColumnPattern) – column table
-
launch_analisis
()¶ Launches special analisis, using the stats submodule.
-
row_height
(ws, from_row=2, height=35)¶ Set the height of the rows of the passed worksheet.
- Parameters
ws (Worksheet) – worksheet into write headers
from_row (int) – row to start from. Default to ‘2’ = ignoring headers.
height (int) – fixed height to apply. Default to 35.
-
set_worksheets
(auto=None, vector=1, raster=1, service=1, resource=1, dashboard=0, attributes=0, fillfull=0, inspire=0)¶ Adds new sheets depending on present metadata types in isogeo API search tags.
- Parameters
auto (list) – typically auto=search_results.get(‘tags’).keys()
vector (bool) – add vector sheet
raster (bool) – add raster sheet
service (bool) – add service sheet
resource (bool) – add resource sheet
dashboard (bool) – add dashboard sheet
attributes (bool) – add attributes sheet - only if vector is True too
fillfull (bool) – add fillfull sheet
inspire (bool) – add inspire sheet
-
store_md_generic
(md, ws, idx)¶ Exports generic metadata attributes into Excel worksheet with some dynamic adaptations based on metadata type.
- Parameters
md (Metadata) – metadata object to export
ws (Worksheet) – Excel worksheet to store the exported info
idx (int) – row index in the worksheet
-
store_metadatas
(metadata, share=None)¶ Write metadata into the worksheet.
- Parameters
metadata (Metadata) – metadata object to write
share (Share) – share to use to build the OpenCatalog URL
-
styling_cells
(ws, columns)¶ Applies the referenced style to the cells of a column.
- Parameters
ws (Worksheet) – worksheet into write headers
columns (ColumnPattern) – column table
-
tunning_worksheets
(excluded_sheets='dashboard')¶ Applies some adjustments to the sheets of the workbook: filters, frozen panels, print settings, etc.
- Parameters
excluded_sheets (tuple) – sheets name to be excluded from the tunning.