Skip to content

Commit 1ba566d

Browse files
author
Daniel Moder
committed
Add option to submit with filename
1 parent a85dc75 commit 1ba566d

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

bin/submit_samples.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import argparse
55
import configparser
66
import io
7+
import os
78
import sys
89
import time
910
from typing import Generator
@@ -156,6 +157,15 @@ def main():
156157
default=False,
157158
help="if set, skip waiting for completion and only print the analysis links",
158159
)
160+
parser.add_argument(
161+
"-n",
162+
"--include-file-names",
163+
dest="include_names",
164+
action="store_true",
165+
default=False,
166+
help="if set, include file name when submitting",
167+
)
168+
159169
decoders.InputTypeDecoder.add_arguments_to_parser(
160170
parser=parser,
161171
choices=[
@@ -222,6 +232,7 @@ def main():
222232
bypass_cache=args.bypass_cache,
223233
bypass_prefilter=args.bypass_prefilter,
224234
delete_after_analysis=args.delete_after_analysis,
235+
file_name=os.path.basename(file_path) if args.include_names else None,
225236
)
226237
submissions.append(ret)
227238
task_to_source[ret["task_uuid"]] = file_path

0 commit comments

Comments
 (0)