We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent db9dd08 commit 6bd8917Copy full SHA for 6bd8917
src/extractcode/extract.py
@@ -230,6 +230,14 @@ def extract_files(
230
logger.debug('extract:walk:recurse:extraction event: %(xevent)r' % locals())
231
yield xevent
232
233
+def extract_libre_office_document(location, target):
234
+ """ Extract Libre Office documents (e.g., .ods files) as ZIP archives. """
235
+ if not zipfile.is_zipfile(location):
236
+ return
237
+ with zipfile.ZipFile(location, 'r') as zip_ref:
238
+ zip_ref.extractall(target)
239
+ print(f"Extracted Libre Office document from {location} to {target}")
240
+
241
242
def extract_file(
243
location,
0 commit comments