Nautilus script

15 views
Skip to first unread message

Arnab Chakraborty

unread,
Apr 3, 2017, 9:28:43 AM4/3/17
to TMSU
Hi,

   I have just started with TMSU, and am loving it. I created a little Nautilus BASH script to tag files easily. It is still quite ugly. But just in case someone might find it useful, here is the code:

 val=`zenity --entry`
notify-send "Applying tag '$val'"
lst=$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS
echo $lst > /tmp/tmp.txt
fl=`sed -f /path/to/tag.sed < /tmp/tmp.txt`
cm="/path/to/tmsu tag --tags $val $fl"
eval $cm

This script takes care of spaces in file names. It uses a sed script for this (called tag.sed above).:

 s| /home|" "/home|g
s|^|"|
s|$|"|

Here "/home" is the start of every absolute file path in my system.

The script is pretty crude. So use it with care!

Best.

Arnab.

Paul Ruane

unread,
Apr 3, 2017, 10:06:50 AM4/3/17
to tm...@googlegroups.com
Hi, glad you're enjoying TMSU.

Thanks for creating the script. Unfortunately I can't offer any feedback as I don'use Nautilus, but I'm sure some others could get back to you.

Paul

--
You received this message because you are subscribed to the Google Groups "TMSU" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tmsu+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages