Package Structure¶
Subpackages & Modules
NoMETA is a library for editing MS Office documents metadata, it works with documents of Office >= 2007 and has been tested with docx, pptx, xlsx, vsdx and accdt files.
Classes
- class nometa.Document(file: str | IO[bytes], cls_core: Type[Core], cls_app: Type[App])¶
The Document class aggregates two sheets. One sheet represents the docProps/app.xml and the other one represents the docProps/core.xml
- __init__(file: str | IO[bytes], cls_core: Type[Core], cls_app: Type[App]) None¶
Open the specified document to handle its metadata.
- property app: App¶
Get App sheet instance correponding to docProps/app.xml file.
- Raises:
NotImplementedError – throws when there is no App instance.
- Returns:
an instance of nometa.sheet.App
- Return type:
- property core: Core¶
Get Core sheet instance corresponding to docProps/core.xml file.
- Returns:
an instance of nometa.sheet.Core
- Return type:
- save(outfile: str | IO[bytes]) None¶
Save the changes to the specified document in outfile parameter.
- Parameters:
outfile (str | IO[bytes]) – file path (as string) to document or in memory buffer (io.BytesIO)
- Raises:
IOError – throws when input and output file path/buffer are the same