|
Tagsistant is really the best proof-of-concept I've seen so far in creating a 'tagging' filesystem. I've been using it for a collection of videos I have. In order to make tagging more efficient, I've created the following python script. It takes a file outside of the repository, copies it in the repository and then symbolically links to that file in order to correctly associate tags.
It seems that using symbolic links in tagsistant throws a filesystem error, so I've had to ignore that error in this script.
I hope to make more scripts and eventually some GUIs. It looks like development on this project is a little stalled, but I hope it continues. It's a really good concept.
<pre>
cat /usr/local/bin/tagsissy.py
#!/usr/bin/env python
import sys
from shutil import move
from os import symlink,path,errno
tagdir = '/media/tags/'
tags = agsistant is really the best proof-of-concept I've seen so far in creating a 'tagging' filesystem. I've been using it for a collection of videos I have. In order to make tagging more efficient, I've created the following python script. It takes a file outside of the repository, copies it in the repository and then symbolically links to that file in order to correctly associate tags.
It seems that using symbolic links in tagsistant throws a filesystem error, so I've had to ignore that error in this script.
I hope to make more scripts and eventually some GUIs. It looks like development on this project is a little stalled, but I hope it continues. It's a really good concept.
<pre>
cat /usr/local/bin/tagsissy.py
#!/usr/bin/env python
import sys
from shutil import move
from os import symlink,path,errno
tagdir = '/media/tags/'
tags = []
file = sys.argv[1]
for arg in sys.argv[2:]:
tags.append(arg)
if(not path.isdir(path.join(tagdir,arg))):
print "%s is not a tag" % arg
exit(1)
coredir = path.join(tagdir,tags[0])
#print "Moving %s to %s" % (file,coredir)
print "file: %s" % file
print "tagging: %s" % tags[0]
move(file,coredir)
for t in tags[1:]:
src = path.join(coredir,file)
dest = path.join(tagdir,t,file)
#print "source:" + src
#print "dest:" + dest
print "tagging: %s" % t
try:
symlink(src,dest)
except OSError, e:
if not e.errno == errno.EEXIST:
print "error creating link" + e.errno
print "done"
</pre>
|