Compare commits
4 Commits
a847ff6301
...
dcbc0b23d6
Author | SHA1 | Date |
---|---|---|
Lukáš Kucharczyk | dcbc0b23d6 | |
Lukáš Kucharczyk | f22c4ce044 | |
Lukáš Kucharczyk | 353b86af65 | |
Lukáš Kucharczyk | 1f6761bf5a |
9
tag.sh
9
tag.sh
|
@ -1,5 +1,6 @@
|
|||
#!/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
|
||||
|
@ -12,12 +13,16 @@ 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="database.sql"
|
||||
DB_SCHEMA="${SCRIPT_DIR}/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;
|
||||
|
|
Loading…
Reference in New Issue