Compare commits

..

No commits in common. "dcbc0b23d6ec7bb7d293f5144398a80608499de8" and "a847ff6301349cf71f74a9aea6a104a024de8c8a" have entirely different histories.

1 changed files with 2 additions and 7 deletions

9
tag.sh
View File

@ -1,6 +1,5 @@
#!/usr/bin/env bash
set -ueo pipefail
[ "${DEBUG:-0}" = "1" ] && set -x
# usage:
# - init - create an empty database
# - import - import $FILE or import $DIR, both can be multiple values
@ -13,16 +12,12 @@ set -ueo pipefail
# - tag $FILENAME $TAG - tag $FILENAME with $TAG, $TAG can be repeated
# - listtags $FILENAME - list all tags for $FILENAME
# TODO: when tagging, check if tags exist
# TODO: when tagging, allow more than one tag
# FIXME: adding tags doesn't work
SCRIPT_DIR=$(dirname $(readlink "$0"))
DB_FILE="tags.db"
DB_SCHEMA="${SCRIPT_DIR}/database.sql"
DB_SCHEMA="database.sql"
declare -A FILTERS
FILTERS[video]="avi|flv|mkv|mov|mp4|mpg|ogv|webm|wmv"
[ "${DEBUG:-0}" = "1" ] && set -x
fail() {
echo "$1" >&2;