caoscrawler.converters.zipfile_converter module#
Converters take structure elements and create Records and new structure elements from them.
This converter opens zip files, unzips them into a temporary directory and exposes its contents as File structure elements.
- class caoscrawler.converters.zipfile_converter.ZipFileConverter(definition: dict, name: str, converter_registry: dict)#
Bases:
SimpleFileConverterConvert zipfiles.
- cleanup()#
This function is called when the converter runs out of scope and can be used to clean up objects that were needed in the converter or its children.
- create_children(generalStore: GeneralStore, element: StructureElement)#
Loads an ROCrate from an rocrate file or directory.
Arguments:#
element must be a File or Directory (structure element).
Returns:#
A list with an ROCrateElement representing the contents of the .eln-file or None in case of errors.
- setup()#
Analogous to cleanup. Can be used to set up variables that are permanently stored in this converter.