Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion sherlock_project/sherlock.py
Original file line number Diff line number Diff line change
Expand Up @@ -726,6 +726,12 @@ def main():
default=False,
help="Disable creation of a txt file",
)
parser.add_argument(
"--filename-prefix",
"-fp",
dest="filename_prefix",
help="Add a prefix to the output file names.",
)

args = parser.parse_args()

Expand Down Expand Up @@ -873,7 +879,10 @@ def main():
os.makedirs(args.folderoutput, exist_ok=True)
result_file = os.path.join(args.folderoutput, f"{username}.txt")
else:
result_file = f"{username}.txt"
if args.filename_prefix:
result_file = f"{args.filename_prefix}{username}.txt"
else:
result_file = f"{username}.txt"

if not args.no_txt:
with open(result_file, "w", encoding="utf-8") as file:
Expand Down