aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsavewebfonts_lib.py8
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
"""
bgstack15