Skip to main content

officeextractor

Test Status Build Status Coverage Status
Version Info PyPI Version PyPI Downloads
Compatibility Python Versions
Style Code Style: Black pre-commit

About

officeextractor is a Python library to extract media files like images, audio and video from office documents (Microsoft Office & LibreOffice).


Supported File Types

Supported File Types Supported Media Formats
Microsoft Word docx, docm, dotm, dotx images
Microsoft Excel xlsx, xlsb, xlsm, xltm, xltx images
Microsoft PowerPoint potx, ppsm, ppsx, pptm, pptx, potm images, video & audio
LibreOffice Writer odt, ott images
LibreOffice Calc ods, ots images
LibreOffice Impress odp, otp, odg images
⚠ NOTE: Microsoft Office 2003 files (doc, dot, xls, xlt, ppt, pot) are not supported.

Installation

pip install officeextractor

Usage

>>> import officeextractor

>>> officeextractor.extract(src=("File1.docx", "Folder/File2.xlsx"), dest="Path/To/Output/Folder")

4 media files extracted from File1.docx:
- 2 jpeg
- 1 gif
- 1 png

1 media file extracted from Folder/File2.xlsx:
- 1 png
Parameters

officeextractor.extract(src, dest, log=True)

src : str, list of str or tuple of str

Either a single file (string) or several files (list/tuple of strings) as relative or full path.

dest : str

Output directory as relative or full path. If the directory doesn't exist, it will be created.

log : bool, optional

Whether logging should be actived or not. If True, print a summary of the extraction. Default is True.


Release Notes

Can be found here on GitHub


Licence

GNU General Public License v3.0

Metadata

Release files for officeextractor 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for officeextractor 0.1.2
File Size Uploaded
officeextractor-0.1.2.tar.gz 19.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for officeextractor 0.1.2
File Interpreter ABI Platform
officeextractor-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 37.3 kB

Release files / officeextractor-0.1.2.tar.gz

Download URL officeextractor-0.1.2.tar.gz
Size 19.2 kB
Tags Source
SHA-256 checksum
How to use checksums
88ad0272c299d72cb5b5c0e6e3503c2ad0e01f7e8d453cda95923acb6306dcca
BLAKE2b-256 checksum
How to use checksums
6149af188c037d2b9b4f37bf83278b86fd861f8b835cd1ed281ed61ec328331a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.13.0

Release files / officeextractor-0.1.2-py3-none-any.whl

Download URL officeextractor-0.1.2-py3-none-any.whl
Size 18.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
049fef2bdc0df4e3c8f76b7278dc74cf77c8232667362c6d82648ccacca120d9
BLAKE2b-256 checksum
How to use checksums
2746f0c74a2718b18b1bda68529d3c2d8c3a06e49c0753266c346594eb3a11f4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.13.0

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page