-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
169 lines (127 loc) · 5.15 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
Welcome to Tagsistant, a personal manager for your files. Tagsistant is
a semantic file system for Linux and BSD kernels. It's based on FUSE
library and kernel module, so it's a userspace application.
TOC:
1. Introduction
2. How Tagsistant works
3. Semantics
4. Plugins
1. Introduction
Tagsistant is a semantic file system for Linux and BSD kernels. Its
goal is to allow users to catalog files using tags (labels, mnemonic
informations) rather than directories. But since it is also a file
system, it's based on directories. How the two concepts relate?
It's quite simple. You are, of course, already familiar with file
systems interface: a hierarchical structure of directories which
hosts files (and other objects like devices, sockets and more).
Tagsistant use directories with another meaning. It doesn't give to
a directory its ususal folder meaning. It uses directories as tags.
As a consequence, each file inside a directory is tagged by that
directory.
To create a new tag, just create a directory. To tag a file just
copy or link it inside the directory you wish.
2. How Tagsistant works
In our example, we'll assume that tags/ is a directory which is
under tagsistant control, and that, inside this directory there
are two directories called "music" and "photo", filled as in the
following scheme:
tags/
music/
song1.mp3
song2.wav
photo/
img_3233.jpg
img_3459.jpg
Assuming this hierarchy is a Tagsistant managed space, the files
song1.mp3 and song2.wav are tagged as music, and the files
img_3233.jpg and img_3459.jpg are tagged as photo. Let suppose that
image img_3233.jpg and file song2.wav came from a friend named
Jack and you want to record that information inside your Tagsistant
space. All you have to do is:
$ mkdir tags/jack/
$ cp music/song2.wav tags/jack/
$ cp photo/img_3233.jpg tags/jack/
Resulting hierarchy will be as follows:
tags/
music/
song1.mp3
song2.wav
photo/
img_3233.jpg
img_3459.jpg
jack/
img_3233.jpg
song2.wav
You may ask: that can be done with a normal filesystem. And you'll be
right. But with a difference. Tagsistant will store song2.wav and
img_3233.jpg just one time, saving space.
But having such a hierarchy would be of little or no help in searching
your files if you are not able to perform a logical query. Here enters
Tagsistant. Using the path, a concept your are already used to play with,
you can perform queries inside a Tagsistant space. How? Look at following
example:
$ ls tags/jack/
AND/ OR/ song2.wav img_3233.jpg
$ ls tags/jack/AND/
photo/ music/
$ ls tags/jack/AND/music/
song2.wav
$
The path "jack/AND/music/" will result in all the files tagged as both
"jack" and "music". The AND special directory can be used to create a
set of criteria which should match togheter to fullfill the query. As
opposite, the OR special directory allows more powerful queries, by
concatenating the results of more than one set of AND-chained criteria.
As an example:
$ ls tags/jack/AND/music/
song2.wav
$ ls tags/photos/
img_3233.jpg img_3459.jpg
$ ls tags/jack/AND/music/OR/photos/
song2.wav img_3233.jpg img_3459.jpg
$
3. Semantics
All you have seen so far is already enough to make Tagsistant an
interesting tool. But to be really powerful, something more needs to
be added. For example, think of music genres, like rock, heavy metal
and jazz. You, off course, are a fine music listener which loves to
catalogue its music by genre. You used Tagsistant to create rock/,
jazz/ and heavy_metal/ tags. But you are tired of using a query like:
$ ls tags/rock/OR/jazz/OR/heavy_metal/
every time you need to display your complete collection. You will
love really a lot more to teach Tagsistant that music/ is an alias
for all that ones. How to do it?
Tagsistant embeds a simple reasoning engine which allows you to
establish relations between two tags. Two kind of relations are
allowed so far: inclusion and equivalence. The first one is what
will solve our problem.
First of all, you create a new music/ tag:
$ mkdir tags/music/
Then you use Tagsistant manager, which is a Gtk+ application included
in Tagsistant distribution to create a new relation, stating that:
"music" "includes" "rock"
and other two, stating that:
"music" "includes" "heavy_metal"
and
"music" "includes" "jazz"
Now, all you have to do is just:
$ ls tags/music/
[lot of jazz and metal and rock files here...]
$
Of course, using heavy_metal with the underscore to play nicely with
the file system is something your eye can't tolerate. So you create a
new tag:
$ mkdir tags/heavy\ metal/
and add a new relation:
"heavy metal" "is equivalent" "heavy_metal"
4. Plugins
Tagsistant also come with a plugin API to extend its behaviour. Some
experimental plugins for .ogg .mp3 .xml .html and other formats are
provided. What they do is add more tags to a file, using specific
procedures.
So far, autotagging plugins does not inspect file contents. Just add
a generic tag (like "audio" for .ogg and .mp3 files) but in the near
future, using proper libraries, contents will be extracted and used
to autotag files (like ID3 tags for MP3 files).
If you want to contribute a plugin for Tagsistant, please read the
howto at http://www.tagsistant.net/write_plugin.shtml