Registered Member
|
I'm excited about the tagging feature, but I'm not a fan of mice or GUI file browsers. Does anybody know of a command-line tool for adding and querying the tags associated with a file? I thought sopranocmd was supposed to be a command-line semantic desktop tool, but I see no mention of tags in the pages of help text it spits out when I run it.
I can't believe that I can't even think of a query that returns anything relevant. Am I completely misunderstanding what sopranocmd does? Thanks. |
Administrator
|
I am not aware of any utility which provides this functionality at this time. If you can script, you may wish to check the various bindings which are available from kdebindings though.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered Member
|
Yes, thank you, that's exactly what I'm looking for. I'm surprised I never heard of this before. Where can I learn more about using kde-bindings with a shell script? Also, does anybody know if qdbus supports tagging? Because that might be another approach for scripting. |
Administrator
|
qdbus as far as I know doesn't. kdebindings provides bindings of KDE's C++ API in the various languages. I haven't used them before myself however. I suggest consulting the documentation at api.kde.org for more information.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Administrator
|
Creating a script to tag files should be very easy. If you're into Python, this tutorial I wrote should be a good start.
"Violence is the last refuge of the incompetent."
Plasma FAQ maintainer - Plasma programming with Python |
Registered Member
|
Yes, thank you, einar! This looks like exactly what I need. I haven't written much in Python before, but this looks like the perfect opportunity to learn.
Two questions: 1. Where can I read the documentation of the Python syntax for the query command? Once I get it figured out I'll be happy to report back so you can include it in your example. 2. Your tutorial mentions that absolute paths should be used. Does this mean that if at some point I hardlink or move my files to a new location the metadata will all be lost? Uh oh. |
Registered users: Bing [Bot], Evergrowing, Google [Bot], rblackwell