commit 0b49889fcdafe08dd33a36b2bbd3985fddb0e875
parent 40ec2e831cd7e2df973d32b54adf74b2a982d4ef
Author: William Casarin <jb55@jb55.com>
Date: Tue, 4 May 2021 03:49:07 -0700
pandocweb: wget failing is ok
Diffstat:
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/bin/pandocweb b/bin/pandocweb
@@ -37,10 +37,13 @@ wget \
--restrict-file-names=windows \
--domains "$hostname" \
--no-parent \
- "$url" 1>&2
+ "$url" || :
+printf "finding html file... \n" 1>&2
target=$(find . -name '*.htm*' | grep . | head -n1)
-file=$(basename "$target")
+printf "found: %s\n" "$target" 1>&2
+file="$(basename "$target")"
+
cd "$(dirname "$target")"
printf "converting %s ... " "$file" 1>&2
$PANDOC "$file" -o "$out_name" 1>&2