#!/usr/bin/env bash
set -euo pipefail
IFS=$'\n\t'

if [ $# -lt 2 ] ; then
    echo "$(basename $0) URL MARKDOWN-FILE" >&2
    exit 1
fi

URL=$1
MDFILE=$2

pandoc -f html-native_spans-native_divs \
       -t markdown+pandoc_title_block -s \
       -o ${MDFILE} \
       ${URL}
