seabirdfilehandler.xmlfiles module

Inheritance diagram of seabirdfilehandler.xmlfiles
class seabirdfilehandler.xmlfiles.XMLFile(path_to_file)[source]

Bases: UserDict

Parent class for XML and psa representation that loads XML as a python-internal tree and as a dict.

Parameters:

path_to_file (Path | str :) – the path to the xml file

to_xml(file_name=None, file_path=None)[source]

Writes the dictionary to xml.

Parameters:
  • file_name (str :) – the original files name (Default value = self.file_name)

  • file_path (pathlib.Path :) – the directory of the file (Default value = self.file_dir)

to_json(file_name=None, file_path=None)[source]

Writes the dictionary representation of the XML input to a json file.

Parameters:
  • file_name (str :) – the original files name (Default value = self.file_name)

  • file_path (pathlib.Path :) – the directory of the file (Default value = self.file_dir)

class seabirdfilehandler.xmlfiles.XMLCONFile(path_to_file)[source]

Bases: XMLFile

get_sensor_info()[source]

Creates a multilevel dictionary, dropping the first four dictionaries, to retrieve pure sensor information.

Return type:

A list of all the individual sensor information, stored in dictionaries

class seabirdfilehandler.xmlfiles.PsaFile(path_to_file)[source]

Bases: XMLFile