get-tags
a bash script that lists slugified tags found in front matter tags array
#!/usr/bin/env bash
usage() {
cat <&2
exit $err
}
# the following will help allow access to the sed scripts
test "$(git rev-parse --show-toplevel)" == "$PWD" || \
die 1 "please run ${0##*/} from the top level of the repository"
# parse the command-line options:
while getopts 'h' option; do
case "$option" in
h) usage; exit 0 ;;
?) usage; exit 0 ;;
esac
done
(( OPTIND-- ))
shift $OPTIND
if [ $# -gt 0 ]; then # process remaining args on the commandline
while [ $# -gt 0 ]; do
print_tags "$1"
shift
done
else usage; fi