Skip to content

Commit

Permalink
replace '\f' in --print arguments with form feed character
Browse files Browse the repository at this point in the history
to make it easier to use special type format strings on command-line
(mikf#6938)
  • Loading branch information
mikf committed Feb 7, 2025
1 parent 28385be commit e2134b3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gallery_dl/option.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,9 @@ def __call__(self, parser, namespace, value, option_string=None):
if not format_string:
return

if "{" not in format_string and \
if format_string.startswith("\\f"):
format_string = "\f" + format_string[2:]
elif "{" not in format_string and \
" " not in format_string and \
format_string[0] != "\f":
format_string = "{" + format_string + "}"
Expand Down

0 comments on commit e2134b3

Please sign in to comment.