3 . "$_EXEC/cgilite/storage.sh"
4 . "$_EXEC/indexmeta.sh"
6 for select in $(seq 1 $(POST_COUNT select)); do
7 file="$_DATA/$ITEM/$(POST select $select)"
8 meta="${file%/*}/.index/meta"
10 read -r length width height tags comment fn <<-EOF
15 grep -vF " $fn" "$meta" >"${meta}.tmp"
16 tags="$(UNSTRING "${tags#tags=}" |tr , '\n')"
18 for tn in $(seq 1 $(POST_COUNT tag)); do
19 tags="$(printf '%s\n%s' "$tags" "$(POST tag $tn)")"
21 tags="$(printf '%s\n%s' "$tags" "$(POST newtag |tr -d '\r')")"
23 tags="$(printf %s "$tags" |sort -u |tr '\n' ,)"
24 printf '%i\t%i\t%i\ttags=%s\t%s\t%s\n' \
25 "$length" "$width" "$height" \
26 "$(STRING "${tags#,}")" \
29 mv "${meta}.tmp" "$meta"