#!/bin/sh set -eu TLD="$(cat aux/tld.txt)" PROJECT_UC= while getopts 'n:N:m:o:' flag; do case "$flag" in n) PROJECT="$OPTARG" ;; N) PROJECT_UC="$OPTARG" ;; m) MAILING_LIST="$OPTARG" ;; o) OUTDIR="$OPTARG" ;; *) exit 2 ;; esac done shift $((OPTIND - 1)) assert_arg() { if [ -z "$1" ]; then echo "Missing $2" >&2 exit 2 fi } assert_arg "${PROJECT:-}" '-n PROJECT' assert_arg "${MAILING_LIST:-}" '-m MAILING_LIST' assert_arg "${OUTDIR:-}" '-o OUTDIR' if [ -z "${PROJECT_UC:-}" ]; then PROJECT_UC="$PROJECT" fi TODOS_ADD_REGEX='s/^## (TODO|DOING|WAITING|MEETING|INACTIVE|NEXT|CANCELLED|DONE) (.*) \{#(.*?)\}$/## \1<\/span> \2<\/a>\n
#\3<\/pre>\n/'
TODOS_CLEANUP_REGEX1='s/( "$OUTDIR/TODOs.html"