#!/bin/sh # nihdoc -> html with header and footer [ -z "$1" ] && echo "usage: genpage FILE" 1>&2 && exit 1 REPO=$(dirname "$(dirname "$0")") GITDIR=${GITDIR:-$REPO} title=$(grep '^# ' "$1" | cut -c3- | tr -d '`*_') cat < $title | alexkarle.com ' nihdoc < "$1" cat <
Last Updated: $(git -C "$GITDIR" log --pretty="%cs" -n 1 -- "$1") (License) EOM cat < EOM