diff options
author | B. Stack <bgstack15@gmail.com> | 2021-04-04 21:40:22 -0400 |
---|---|---|
committer | B. Stack <bgstack15@gmail.com> | 2021-04-04 21:40:22 -0400 |
commit | d0710ebca7ae5e8824e665121a44594fc9d79664 (patch) | |
tree | f2f7710443577a06c4eb0cde2c07ea111d72dc07 /savewebfonts_lib.py | |
parent | add config class, and eot-ttf conversion (diff) | |
download | save-webfonts-d0710ebca7ae5e8824e665121a44594fc9d79664.tar.gz save-webfonts-d0710ebca7ae5e8824e665121a44594fc9d79664.tar.bz2 save-webfonts-d0710ebca7ae5e8824e665121a44594fc9d79664.zip |
add a default config, which uses dryrun=True
Diffstat (limited to 'savewebfonts_lib.py')
-rwxr-xr-x | savewebfonts_lib.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/savewebfonts_lib.py b/savewebfonts_lib.py index 0c5943e..53615c1 100755 --- a/savewebfonts_lib.py +++ b/savewebfonts_lib.py @@ -31,7 +31,7 @@ class swf_config: , session = None , MAX_STRING_PRINT_LENGTH = 180 , eot2ttf_binary = "eot2ttf" - , dryrun = False + , dryrun = True , convert = False ): self.debuglevel = debuglevel @@ -53,6 +53,8 @@ class swf_config: response = response.rstrip(",") + ">" return response +config_default = swf_config() + # Functions def eprint(*args, **kwargs): print(*args, file=stderr, **kwargs) @@ -232,7 +234,7 @@ def save_all_fonts(all_fonts, destdir, config): save_font(font, destdir, config) return 0 -def whitelist_page(url, fontdir, config): +def whitelist_page(url, fontdir, config = config_default): """ For the given URL, Save all listed webfonts to a directory named after the domain, underneath the given fontdir. If convert, then @@ -250,7 +252,7 @@ def whitelist_page(url, fontdir, config): # Save all fonts to that dir return save_all_fonts(all_fonts, destdir, config) -def whitelist_harfile(harfile, fontdir, config): +def whitelist_harfile(harfile, fontdir, config = config_default): """ Given the harfile, save all fonts listed in the discovered css files """ |