Skip to content

Commit 3aea7d7

Browse files
committed
feat(cli): Make extract and carve suffix configurable
1 parent 8024aed commit 3aea7d7

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

unblob/cli.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,21 @@ def __init__(
234234
show_default=True,
235235
help="Keep extracted chunks",
236236
)
237+
@click.option(
238+
"--carve-suffix",
239+
"carve_suffix",
240+
default="_extract",
241+
show_default=True,
242+
help="""Carve directory name is source file + this suffix.
243+
NOTE: carving is skipped when the whole file is of a known type""",
244+
)
245+
@click.option(
246+
"--extract-suffix",
247+
"extract_suffix",
248+
default="_extract",
249+
show_default=True,
250+
help="Extraction directory name is source file + this suffix",
251+
)
237252
@verbosity_option
238253
@click.option(
239254
"--show-external-dependencies",
@@ -263,6 +278,8 @@ def cli(
263278
clear_skip_magics: bool, # noqa: FBT001
264279
skip_extraction: bool, # noqa: FBT001
265280
keep_extracted_chunks: bool, # noqa: FBT001
281+
carve_suffix: str,
282+
extract_suffix: str,
266283
handlers: Handlers,
267284
dir_handlers: DirectoryHandlers,
268285
plugins_path: Optional[Path],
@@ -294,6 +311,8 @@ def cli(
294311
handlers=handlers,
295312
dir_handlers=dir_handlers,
296313
keep_extracted_chunks=keep_extracted_chunks,
314+
extract_suffix=extract_suffix,
315+
carve_suffix=carve_suffix,
297316
verbose=verbose,
298317
progress_reporter=NullProgressReporter
299318
if verbose

0 commit comments

Comments
 (0)