File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,10 @@ inputs:
2020 description : ' Width of diff images. Default is 1280px'
2121 required : false
2222 default : 1280
23+ template-dir :
24+ description : ' Directory to custom html test pages. If no directory is provided, use gftools/templates'
25+ required : false
26+ default : ' none'
2327runs :
2428 using : " composite"
2529 steps :
Original file line number Diff line number Diff line change 88from gftools .utils import font_familyname , download_family_from_Google_Fonts
99from glob import glob
1010import argparse
11-
11+ from pkg_resources import resource_filename
1212
1313
1414parser = argparse .ArgumentParser ()
1717parser .add_argument ("--fonts_before" , default = "none" )
1818parser .add_argument ("--width" , type = int , default = 1280 )
1919parser .add_argument ("--out" , default = "screenshots" )
20+ parser .add_argument ("--template_dir" , default = "none" )
2021args = parser .parse_args ()
2122
23+
24+ template_dir = args .template_dir if args .template_dir != "none" else resource_filename ("gftools" , "templates" )
25+
2226os .mkdir (args .out )
2327
2428for font_dir in args .paths :
3236 html = HtmlProof (
3337 fonts ,
3438 out = out ,
35- selenium_screenshots = True
39+ template_dir = template_dir ,
40+ selenium_screenshots = True ,
3641 )
3742 else :
3843 # User wants to diff against Google Fonts
4651 fonts_before ,
4752 fonts ,
4853 out = out ,
54+ template_dir = template_dir ,
4955 selenium_screenshots = True
5056 )
5157
You can’t perform that action at this time.
0 commit comments