real-world-onion-sites/wrapper.sh

35 lines
557 B
Bash
Raw Normal View History

2019-11-16 14:24:14 +00:00
#!/bin/sh
2019-11-16 20:12:20 +00:00
# hello! yes, this is a public link to a google sheet, to fetch as csv; and yes, i do know.
url='google broke this function'
2019-11-16 14:24:14 +00:00
now=`date "+%Y%m%d%H%M%S"`
out="log-$now.out.txt"
err="log-$now.err.txt"
csv="master.csv"
exe="./rwos-db.py"
exec </dev/null >$out 2>$err
2019-11-16 21:02:54 +00:00
case "x$1" in
x-n) dofetch=false ;;
*) dofetch=true ;;
esac
2019-11-16 14:24:14 +00:00
set -x
2021-06-01 09:43:02 +00:00
# todo: update the CSV?
2019-11-16 14:24:14 +00:00
2019-11-16 21:02:54 +00:00
if $dofetch ; then
$exe fetch || exit 1
fi
2019-11-16 14:24:14 +00:00
(
cat 01-preamble.md
echo ""
$exe print || exit 1
echo ""
cat 02-footnotes.md
echo ""
) > README.md
exit 0