aboutsummaryrefslogtreecommitdiff
path: root/savewebfonts_lib.py
diff options
context:
space:
mode:
authorB. Stack <bgstack15@gmail.com>2021-04-05 08:07:28 -0400
committerB. Stack <bgstack15@gmail.com>2021-04-05 08:07:28 -0400
commit91e372ff5f42ce3a8406057cf0bf35d54712595c (patch)
tree58bd00373598872438cab5e9bad98caad07a6ab8 /savewebfonts_lib.py
parentadd support for fonts inline in css as url data: (diff)
downloadsave-webfonts-91e372ff5f42ce3a8406057cf0bf35d54712595c.tar.gz
save-webfonts-91e372ff5f42ce3a8406057cf0bf35d54712595c.tar.bz2
save-webfonts-91e372ff5f42ce3a8406057cf0bf35d54712595c.zip
more precise logging
Diffstat (limited to 'savewebfonts_lib.py')
-rwxr-xr-xsavewebfonts_lib.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/savewebfonts_lib.py b/savewebfonts_lib.py
index b0a6f30..ab8d7c1 100755
--- a/savewebfonts_lib.py
+++ b/savewebfonts_lib.py
@@ -122,7 +122,7 @@ def get_webfonts_for_one_css(url, config):
thisurl = urljoin(url,j.value)
if thisurl not in c:
if config.debuglevel >= 5:
- eprint(f"get_webfonts_for_one_css: Found font url {thisurl}")
+ eprint(f"get_webfonts_for_one_css: Found font url {thisurl[:config.MAX_STRING_PRINT_LENGTH]}")
c.append(thisurl)
# c is a flat list of all font files, many of which are duplicates
return c
@@ -163,7 +163,7 @@ def save_font(url,destdir,config):
pass
else:
# not supported yet!
- eprint(f"Warning: Url {url[:config.MAX_STRING_PRINT_LENGTH]} is unsupported.")
+ eprint(f"Warning: Url {url[:config.MAX_STRING_PRINT_LENGTH]} is unsupported, for file {filepath}.")
return -1
if not config.dryrun:
@@ -232,7 +232,7 @@ def get_all_fonts_from_csslist(all_css, config):
# WORKHERE: allow svg, if convert_woffwoff2_ttf works on svg.
if webfont not in all_fonts and '.svg' not in webfont:
if config.debuglevel >= 2:
- eprint(f"Found font {webfont}")
+ eprint(f"Found font {webfont[:config.MAX_STRING_PRINT_LENGTH+30]}")
all_fonts.append(webfont)
return all_fonts
bgstack15