Skip to content

Commit

Permalink
Merge pull request #161 from kzu/patch-1
Browse files Browse the repository at this point in the history
Allow passing custom_flags via the CLI
  • Loading branch information
vgalin authored Sep 9, 2024
2 parents da4bd04 + 143807d commit 92f9762
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions html2image/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ def size_type(string):
parser.add_argument('--chrome_path', required=False)
# parser.add_argument('--firefox_path', required=False)
parser.add_argument('--temp_path', required=False)
parser.add_argument('--custom_flags', required=False)

args = parser.parse_args()

Expand All @@ -60,6 +61,9 @@ def size_type(string):
if args.chrome_path:
hti.chrome_path = args.chrome_path

if args.custom_flags:
hti.browser.flags = args.custom_flags

if args.temp_path:
hti.temp_path = args.temp_path

Expand Down

0 comments on commit 92f9762

Please sign in to comment.