make_directory_binary

pyarts.xml.make_directory_binary(directory, out='', absolute_out=False, parents=True)[source]

Loads xml-files in directory and saves them back in binary format

Parameters:
  • directory (str) – Directory path.

  • out (str) – Path to save the binary.

  • absolute_out (bool) – If true, then write file to out-path rather than to the relative path out. Does nothing if file is in the working folder and out is relative.

  • parents (bool) – Create missing parent directories.

Returns:

Paths to the created binary files.

Return type:

list[str]

Example

Load arts-xml-data/spectroscopy/cia/hitran2011/ and save it back as binary it at arts-xml-data-binary/spectroscopy/cia/hitran2011/

>>> make_directory_binary('arts-xml-data/spectroscopy/cia/hitran2011',
    out='arts-xml-data-binary/spectroscopy/cia/hitran2011',
    absolute_out=True)
['arts-xml-data-binary/spectroscopy/cia/hitran2011/hitran_cia2012_adapted.xml']