Compare commits

..

2 Commits

Author SHA1 Message Date
378d91ca0e
tagger.sh: allow tagging existing files 2023-07-28 19:21:40 -04:00
07590582d6
preview*: updated 2023-07-28 09:22:53 -04:00
3 changed files with 9 additions and 1 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 MiB

After

Width:  |  Height:  |  Size: 1.7 MiB

View File

@ -1,6 +1,7 @@
#!/bin/sh #!/bin/sh
# wrapper over tmsu for easy tagging # wrapper over tmsu for easy tagging
# tags untagged files for the database in the current working directory # tags untagged files for the database in the current working directory
# or pipe in a list of files to tag
set -e set -e
@ -60,7 +61,11 @@ appendargs() {
} }
INPUT_FILE="$(mktemp)" INPUT_FILE="$(mktemp)"
if [ -t 0 ]; then
tmsu untagged > "$INPUT_FILE" tmsu untagged > "$INPUT_FILE"
else
cat /dev/stdin > "$INPUT_FILE"
fi
# this seems to magically fix some tmsu issue i don't really understand # this seems to magically fix some tmsu issue i don't really understand
# tmsu freezes for a second or two # tmsu freezes for a second or two
@ -71,7 +76,10 @@ while read -r FILE; do
continue continue
fi fi
tmsu tags -1 "$FILE" | tail -n+2 > "$TMSU_ARGS"
view "$FILE" view "$FILE"
appendargs appendargs
while true; do while true; do