skppy.parser.meta_parser¶
Parser for the meta/meta.dat entry inside a SketchUp ZIP archive.
Entry points:
from skppy.parser.meta_parser import parse_meta_info, parse_meta_info_from_zip
- skppy.parser.meta_parser.parse_meta_info(data: bytes) SkpMetaInfo[source]
Parse raw
meta/meta.datbytes into aSkpMetaInfoobject.The meta.dat file contains a mix of binary blobs and ASCII strings. All printable ASCII subsequences of four characters or longer are extracted and then classified by pattern matching.
- Parameters:
data (bytes) – Raw bytes read from the
meta/meta.datZIP entry.- Returns:
Parsed metadata with version string, unit, application name, thumbnail paths, and any unrecognised string values.
- Return type:
SkpMetaInfo
- skppy.parser.meta_parser.parse_meta_info_from_zip(filepath: str) SkpMetaInfo[source]
Open a .skp file as a ZIP archive and parse its
meta/meta.datentry.- Parameters:
filepath (str) – Path to the .skp file.
- Returns:
Parsed metadata extracted from
meta/meta.dat.- Return type:
SkpMetaInfo
- Raises:
KeyError – If the ZIP archive does not contain a
meta/meta.datentry.zipfile.BadZipFile – If filepath is not a valid ZIP archive.