#!/bin/sh # Metadata generator for static-site-scripts # It can also generate either the markdown pages or the html pages VERSION=$(git rev-parse --short HEAD) page_id="$(openssl rand -hex 3)" gen_html() { touch pages/${page_id}.html } gen_markdown() { touch pages/${page_id}.md } gen_metadata() { cat << EOF > pages/${page_id}.sh #!/bin/sh title="$2" description="$3" timecreated="$(date +%Y-%m-%d)" timeupdated="$(date +%Y-%m-%d)" author="$4" id="${page_id}" url="${page_id}.html" EOF } show_help() { printf "\t${0}\n" printf "\tpart of static-site-scripts , version ${VERSION}\n" printf "\n" printf "\t-htm