29 lines
490 B
Bash
29 lines
490 B
Bash
#!/bin/sh
|
|
# Metadata generator for static-site-scripts
|
|
# It also creates the associated markdown pages
|
|
|
|
# Program's arguments
|
|
# $1 = Filename
|
|
# $2 = Title
|
|
# $3 = Description
|
|
# $4 = Author
|
|
|
|
cat << EOF > pages/$1.sh
|
|
#!/bin/sh
|
|
title="$2"
|
|
description="$3"
|
|
timecreated="$(date +%Y-%m-%d %T)"
|
|
timeupdated="$(date +%Y-%m-%d %T)"
|
|
author="$4"
|
|
#id="$5"
|
|
#url="${id}.html"
|
|
#tags="$6"
|
|
#keywords="$7"
|
|
#categories="$8"
|
|
#timestamp="${timecreated}"
|
|
#author=""
|
|
#content="custom stuff"
|
|
EOF
|
|
|
|
touch pages/$1.md
|