docs: allow making docs on my mac (identify executable not installed)

This commit is contained in:
Wez Furlong committed 2021-01-31 17:15:35 -08:00
1 parent 6bfadfac0a
commit 90fc2b45ca
2 files changed
+10 -7

No files matched your search

+2 -2
View File
@@ -1,8 +1,8 @@
#!/bin/bash
[[ -f /tmp/wezterm.releases.json ]] || curl https://api.github.com/repos/wez/wezterm/releases > /tmp/wezterm.releases.json
python3 ci/subst-release-info.py
python3 ci/generate-docs.py
python3 ci/subst-release-info.py || exit 1
python3 ci/generate-docs.py || exit 1
mdbook build docs
# mdBook can append js includes but it is too late to register syntax
+8 -5
View File
@@ -49,11 +49,14 @@ class Gen(object):
def image_dimensions(filename):
out = subprocess.check_output(["identify", filename])
fields = out.split()
while fields[0] != b"PNG":
fields = fields[1:]
return [int(x) for x in fields[1].split(b"x")]
try:
out = subprocess.check_output(["identify", filename])
fields = out.split()
while fields[0] != b"PNG":
fields = fields[1:]
return [int(x) for x in fields[1].split(b"x")]
except FileNotFoundError:
return [100, 100]
class GenColorScheme(object):