Tag Archives: database

fdd: Le catalogue extraordinaire

I see the word “fdd” and I think “floppy disk drive.” I don’t know why, but it just pops into my head. This fdd is not a floppy disk drive at all.

2015-03-30-6m47421-fdd-01 2015-03-30-6m47421-fdd-02

You could use it to manage and arrange your floppy disk drives though, and in that sense it’s very helpful.

StreaK left a comment a few days ago about it, and it’s one of the few cataloging tools I can remember for the console. Personally I blame that on the proliferation of high-end, high-performance database tools that are just as easy to use at the command line of your home PC as they are on high-end servers or business-grade machines.

Regardless, fdd is very impressive for its scale. The full-screen approach is nicely arranged with key commands along the bottom, and stretches to fit any size terminal — even smaller than 80×24, which is an accomplishment.

Color is good, with easy-to-read highlights and nicely spaced menus for adding or editing records. fdd is showing its age in some places; it has both 720k and Zip-Disk as options for disk media, even if CDROM and DVD are options too.

I tested fdd by adding a few dull CDs to it, and was pleased to see the ability to read the directory of a drive, and add it automatically to the record, which you can see above. If you’re cataloging collected disks of photos or documents, this could be a huge help.

The home page, as you might have already realized, is long-gone, but the almighty archive.org has an impression of it. Source code is available here, if you want to build it. I didn’t find fdd in either Debian or Arch.

Overall, fdd is a great cataloging tool with good options and a flexible interface. It’s obviously left over from another generation, and now that we’ve arrived at the era of online storage and terabyte-sized media, I don’t know if fdd will find a home or not.

But I can’t deny that it’s a great utility with a great design. I’m willing to give this a gold star even if it probably has outlasted its usefulness: ⭐ Enjoy, if you can. πŸ˜‰

tagfs, xtagfs, dhtfs and more: Tag, you’re it

For some reason, the last file tagging utility I mentioned, tagsistant, touched off a flood of suggestions on tagging titles. Four or five came from just one contributor alone, and I got e-mails about two or three more from other counties.

I didn’t know file tagging tools were so prolific. I’d always just relied on directory trees as the simplest way to arrange things, but now it seems I am living in 1988. 😐

Anachronistic me aside, I’m terribly grateful for all the suggestions. But the sheer volume — and the time it would take to build, set up, learn, playtest and evaluate all of them — means I must go the short route, and list them here as potentially interesting to you, the reader.

I don’t like doing this because there are undoubtedly some very useful tools in here, and it levels the field between the truly genius and the truly jejune. It’s hard to spot a real winner in a crop this dense though, so if you can attest to any one of these, please give us a steer.

  • Dantalian: By the home page’s admission, a “multi-dimensionally hierarchical tag-based transparent lightweight file organization system.” This struck me as closest to tmsu, which I liked best of what I’ve used.
  • debtags: If I understand correctly, debtags is the Debian solution for tagging the tens of thousands of titles in their collection, and that’s quite a testament. tagcoll, if I read the wiki right, is the go-to tool for manipulating the tags. I don’t know (but perhaps you do) if debtags or its underlying structure are applicable beyond that project itself.
  • dhtfs: A tagging system that sports “dynamic directory hierarchies based on tags associated with files.” That suggests to me that the directory structure will evolve as the tags are applied, which is either attractive or horrifying, depending on you. Personally I’m curious in a morbid kind of way, because I like to manage the way things are arranged on my system. Perhaps I shall set up a dummy system and try it out, just for kicks.
  • django-tagging: Kevin sent this one by e-mail, but I don’t have any experience with django, and I think this might go way beyond what I could investigate.
  • flickerfs: This one might be oddball of the group: I believe this latches on to your flicker account and allows you to work the tags in use there. But I don’t use flicker, and so I might be way off base with this one. Thanks to Lars for suggesting it though.
  • pytagsfs: I see this in Debian with the description, “arranges media files in a virtual directory structure based on the file tags,” which might mean it works something like dhtfs for audio files. I might give this one a try later. The home page listed on the package page doesn’t seem to be related to the project, though.
  • stagfs: A “proof-of-concept non-hierarchical FUSE file system deriving structure from independent tag files.” The term “proof-of-concept” says to me that it wasn’t intended for actual use, but it might be a viable product, so don’t take my word for it. I am quite frequently wrong. 😦
  • tag-fs: I have my doubts about this one, only because the downloadable source file is all of 36.7Kb, and the trunk is suspiciously concise. Also, it doesn’t appear to have seen updates since 2008, which is not necessarily a bad sign, only a little worrisome.
  • tagfs: Not to be confused with the previous project, this has seen more recent updates and appears to be (have been?) a more complete effort. It also seems to have an approach like tmsu or tagsistant, and I can see where it might have inspired those two titles. Another of Eric Davis‘s suggestions from a month ago.
  • tracker: tracker confuses me a little bit: Apparently this is a plugin for Nautilus, but I also see that there are things like tracker-utils in Debian, so maybe there are text-based tools that can run it too. If you use GNOME :\ you may want to investigate further. If they can’t be split off from the graphical component, then. … 😦 Thanks to Jonas for the note.
  • xtagfs: I have a strong suspicion this is intended as a tool for Macs, but I won’t discount it out of my relative ignorance about Mac-related software. And sometimes I see where tools written for Macs are implantable in Linux systems. You probably know better than me. … 😐

Of course, like I implied earlier, I simply don’t have the time right now to work with every title here, and so there may be one or two in there that are not only incapable or inappropriate, but impossible. My apologies if you stumble across something so useless as to be laughable. I feel obligated to share the information I receive, since people are kind enough to pass it my way. Just remember, as always, your mileage may vary. Happy tagging. πŸ™‚

tagsistant: Tagging with a different approach

After my great delight at trying tmsu, I was willing to try out tagsistant on Eric Davis‘s suggestion. And between the two of them, I think Eric is right: tmsu might be a better fit for me too.


I can see similarities between tmsu and tagsistant; both use directory trees to arrange tags, and to show combinations between them. tagsistant seems very intuitive when it comes to finding mixed tags, with a simple plus sign showing combinations, and so forth.

tagistant “tags” files by “copying” them into a tag folder, which means adding an entire subfolder is a lot easier than tmsu was. And you can tag a directory itself, without necessarily applying the tag to files inside it. I can see where that might be preferable, and the home page suggests that will keep the database slim.

tagsistant is also file-manager friendly, and I suppose the same thing could be said about tmsu. Once I had a few files tagged and cross-tagged, I could work my way through the directory tree with Midnight Commander, and see how files were arranged between tags.

Probably the best part of tagsistant was the setup. The home page shows you in simple steps how to create a tag system, tag individual files and work the query process. It’s a very comfortable introduction.

My complaints against tagsistant are also simple and fairly straightforward: Perhaps biggest, there’s no way I could see to query the tag system without working through the folder tree.

With tmsu I could just ask it outright what tags were applied to a file, but I don’t see an analogue for that in tagsistant. Please point it out to me, if I’m just being dense.

Second, I see no expedient way to apply multiple tags at a time. The copy-file-to-tag motif is an interesting approach, but it doesn’t lend itself to adding three or four tags at once. I prefer tmsu’s approach, of just listing tags in quick succession.

That might go back to my first, and this last point, just that the tree structure for tagsistant is a useful format, but can be very cumbersome without a file manager. Tab completion helps, but each query up or down the tree is going to require some backspacing, correction and possibly even retyping. My advice? Pick a quick file manager. :\

(Of course, maybe if you could combine this with something like commacd, you might have a very powerful combination. … 😐 )

tagsistant is by no means an unusable tool, and depending on your files and tags, you may prefer this over other options. Definitely look through the advanced documentation, because it will help you with a lot of tagsistant’s finer points.

As for myself, I’ll stick with tmsu, unless one of Eric’s other recommendations wins me over. … πŸ˜‰

cfind: A search tool built on a search tool

I had to read the home page for cfind more than once to figure out what it does, but I don’t think reading it any more will help me understand why it would be useful.

cfind “provides functionality similar to that of Google Desktop from the command line” — and that much I understand. But the little intricacies are escaping me.

cfind needs locate, which is part of mlocate in Arch and not installed by default. Before you can use locate, you have to run updatedb. After that, locate can scramble through the database of your files and pull out just about anything you want, in fractions of a second. That we saw long ago.

Before you can use cfind, you have to run cindex, it’s partner application. Once all those steps are complete, you can query cfind for search strings. So once more: updatedb, then locate if you want, then cindex, and finally cfind.

And here’s the kicker: cfind and locate will generate almost identical output, with two exceptions that I can see. cfind apparently only searches through text and TeX files, and cfind orders its results by “relevance.”

Here’s what it looks like when it’s finished, sort of.


There I sent the results of locate, on the left, and cfind, on the right, through paste with column -t | most for readability’s sake. πŸ˜‰

I guess my confusion lies in the need for a tool to skim a database made from another database, when there’s already a tool that skims the original database. O_o How is cfind better than using straight locate, and filtering the results for TeX or text files?

These are the questions that keep me awake at night. 😐

I appreciate that cfind might fill a niche, but I only rarely work with TeX files and don’t have enough text files to justify a search tool built on a search tool. And without any guidance on its algorithm for “relevance,” I don’t think I’ll be keeping this around.

For the record, this is the second tool I’ve come across in two years that lays claim to the “Google Desktop for the CLI” title. The other, you might remember, was doodle. Neither one seems to have usurped the standby, Unix-esque tools — find or locate — that are already available. 😦

musiql: Perhaps the obvious answer to music management

I’m not a fan of applications that attempt to manage my music collection, mostly because I have the music arranged, in folders, how I like it. Similarly I’m not interested in ratings systems, fuzzy searches, popularity statistics or tagging, other than making sure the data in the built-in tag matches the file name. Sorry. It’s just not my nature.

I do, however, respect programmers and their applications that incorporate those features, not because I want them, but because I know it’s an accomplishment to get them working. So for example, cmus is all the more impressive because it runs perfectly on Pentium 1 hardware and has a lot of useful management features.

I suppose though, if you really wanted to get physical with the console music management concept, you could go to the logical extreme with musiql.


musiql doesn’t have much of an interface, won’t show you pretty timers or multicolor counters, and come to think of it, doesn’t really care what you’re listening to or how it’s arranged.

musiql jams your music collection into SQLite, and sets you free to sort, filter, search and booleanize to your heart’s delight. Once you’ve set the rules for what you want to listen to, musiql pipes everything through mplayer, and the deed is done.

There are a couple of obvious points here that I will go ahead and make, just for clarity.

First and foremost, you’ll need some familiarity with SQLite to get it working. What I showed above is really just a crude hack job that I copied off the examples from the help flags. If you need more intricate selections, you’ll need more intricate selection skills.

Second, if you’re looking for something with more visual panache, musiql isn’t it. In fact, musiql is pretty much a hands-off application, and just serves up your request to mplayer, which does everything else (a job it is more than qualified to do, I should add). You can, of course, send along a few flags to mplayer, if needed (in other words, you can enable -really-quiet).

Third, musiql itself is capable of most fundamental management tasks through command line flags, and will even handle smaller details like last.fm submissions (or disable them, to be more specific). It’s not so obvious (to me) how you can edit or micromanage that music database once it’s built, short of some more SQLite expertise.

On the other hand, I can see where this might open the field to a few more nifty tools. If you’re familiar with SQLite and you’re not intimidated by a music database in that format, this might be the cat’s meow. And I’m sure there are tools (for the console or otherwise) that will assist in reading, editing or at least giving more control over the database itself.

And given that SQLite is intended for high-end servers, corporate-level databases, etc., etc., I’m guessing it can handle the biggest, densest music collection out there. So if you’re touting a 4Tb music melange and lacking for a console application that can wrangle it all, this might be the one for you.

musiql is not the only music player to embrace SQLite, but it might be the one that offers (requires?) the most low-level, hands-on control.

For that, I’ll give a thumbs-up to musiql, and for merging SQLite and mplayer in a fashion I didn’t expect, and for maybe being the most obvious solution for music management. It’s not something I’d adopt any time soon, but I can see the attraction for other folks. Enjoy, at your own risk. πŸ˜‰

tmsu: Guten Tag!

I got an e-mail from Paul a month or so ago, asking politely if I’d look over his tmsu program. I’m glad I did; it’s one of the niftier things I’ve come across for file management in the past year or so.

tmsu is a tagging tool, and a lot more. That might not sound too impressive at first (it didn’t to me), but I’ve had it installed for the past week or so, and I’m quickly becoming addicted to it.

What’s that mean — a tagging tool? Well, no doubt you’ve seen posts on this site that have tags at the bottom; I try to add tags that are vaguely related to the content, so you (or I) can search on topic very easily. You can even enter it from the address bar, and get a list of posts on that tag.

tmsu does much the same for files, plus more. Here’s an example. I have a folder of files that are all jazz music files, in ogg format. I can tag a file with “jazz” and “music” like this.

kmandla@6m47421: ~/downloads/Revolution Void/Increase the Dosage$ ls
01 Invisible Walls.ogg       05 The Modern Divide.ogg      09 Accelerated Lifestyle.ogg
02 Factum par Fictio.ogg     06 Double the Daily Dose.ogg  10 Headphonetic.ogg
03 Habitual Ritual.ogg       07 Weekend Amnesia.ogg        11 Nebulous Notions.ogg
04 Effects of Elevation.ogg  08 Obscure Terrain.ogg

kmandla@6m47421: ~/downloads/Revolution Void/Increase the Dosage$ tmsu tag "01 Invisible Walls.ogg" music jazz

No reply from tmsu, but that just means all went well. Now I can find exact files that have that tag, just by asking tmsu.

kmandla@6m47421: ~/downloads/Revolution Void/Increase the Dosage$ tmsu files jazz
./01 Invisible Walls.ogg

tmsu knows where I am in the folder tree, and shows the location relative to that. If I move elsewhere, tmsu’s reply changes to reflect it.

tmsu can also tell me what tags are applied to a file.

kmandla@6m47421: ~$ tmsu tags downloads/Revolution\ Void/Increase\ the\ Dosage/01\ Invisible\ Walls.ogg 
excellent  jazz  music

kmandla@6m47421: ~$ 

So, what’s so great about that? Well, it means I can tag a file with anything — dates, genres, contributing artists, release date, operating system, file format, program version, codebase, first initial, creator, download site, language, subtitles, video quality, personal ratings, prices, origin — you name it. And not just music files — anything. Plus, you’re not beholden to a rating system, application or specific mark as a tag. Tag it with whatever you like, not just what id3v9.1a says is a legitimate category for an mp3 file. πŸ™„

Here’s a rough example, using personal ratings of excellent, very-good, good, and poor, which is just arbitrary. I’ve abbreviated the lists considerably, of course.

kmandla@6m47421: ~$ tmsu files excellent
./downloads/Revolution Void/Increase the Dosage/01 Invisible Walls.ogg
./downloads/Revolution Void/Increase the Dosage/11 Nebulous Notions.ogg

kmandla@6m47421: ~$ tmsu files poor
./downloads/Revolution Void/Let 1,000 Flowers Bloom/01 Sympathy for Mr Vertigo.ogg
./downloads/Revolution Void/Let 1,000 Flowers Bloom/28 Ye Ye Ye.ogg

Those would all show up if I asked for “jazz” or “music” too, because I added those tags as well.

Now, if that didn’t grab you, here’s where tmsu suddenly changes from mild-mannered scientist into a giant green unstoppable mountain of muscle.

tmsu can mount a folder as a virtual filesystem, and create symbolic links that point back to the original file. Take a look.

kmandla@6m47421: ~$ tmsu mount temp/

kmandla@6m47421: ~$ ls temp/
queries  tags

The tags folder is probably the most obvious one: Inside that folder are all the tags you’ve created, and links back to their target files.

kmandla@6m47421: ~$ ls temp/tags/
alternative  excellent  good  hip-hop  jazz  music  poor  rap  rock  soul  very-good

kmandla@6m47421: ~$ ls temp/tags/excellent/
01 Invisible Walls.410.ogg       05 The Modern Divide.413.ogg      09 Accelerated Lifestyle.405.ogg  music
02 Factum par Fictio.404.ogg     06 Double the Daily Dose.412.ogg  10 Headphonetic.414.ogg
03 Habitual Ritual.406.ogg       07 Weekend Amnesia.408.ogg        11 Nebulous Notions.407.ogg
04 Effects of Elevation.409.ogg  08 Obscure Terrain.411.ogg        jazz

The numbers are file IDs, and the additional tag folders — “jazz” and “music” — point back to still more links. So I can sift even further into specific sequences of tags by following the folders, and for example, find “excellent/jazz/music”. πŸ˜‰

That’s pretty cool, and if you have a massive collection of music or photos to manage, it will save you gobs of time and effort. But wait, there’s more. …

That other folder, queries … what about that? Let me show you first, and then we’ll try to puzzle it through.

kmandla@6m47421: ~$ ls temp/queries

kmandla@6m47421: ~$ ls temp/queries/excellent
01 Invisible Walls.410.ogg       05 The Modern Divide.413.ogg      09 Accelerated Lifestyle.405.ogg
04 Effects of Elevation.409.ogg  08 Obscure Terrain.411.ogg

kmandla@6m47421: ~$ ls temp/queries/

I abbreviated again, as you can see. My ls command created a folder inside queries, and inside there are links to everything that matches my request. Magical, on-the-fly searching and linking.

I haven’t tried using tmsu in conjunction with many graphical programs, but I believe you could create a folder inside queries from within a file selection dialog, and get the same results. I’d be interested to see how that works.

I haven’t found many shortcomings with tmsu; it appears to be very well thought out, and behaves in a very Unixy way. My biggest stumbling block was a way to tag an entire folder of files with spaces in their names; the spaces were confusing tmsu and my use of quotes wasn’t helping matters.

In the end I solved it in a similarly Unixy way, by drafting find into service:

find downloads/Revolution\ Void/ -type f -exec tmsu tag "{}" music jazz \;

And that was more than enough to get the job done.

I only have about 8Gb of music that I keep, and I don’t have much in the way of photos except for family snapshots. tmsu has made me think about how I store those though, and made me wonder if the endless branches of folders are really helping.

I would strongly recommend experimenting with tmsu if you have large masses of files that need quicker access than through a file tree, or even just as a way of managing a flat folder of files without resorting things into subfolders. Check it out for a few minutes at least, and see if it can make things easier for you. πŸ™‚

sqlite3: I won’t begin to try and explain

I have sqlite3 on my list of applications, and I know you can access sqlite database files with it, in console mode.


But I’ll be dead honest: I haven’t a clue what to do next. The .help command ticks off a huge list of commands, and I am hopelessly lost as to what any one of them — except perhaps for .exit — does. 😯

So I mention this only out of a sense of obligation, but I’m just crossing it off my list with this post.

And because I know if I don’t mention it, somewhere down the line, I’ll get that e-mail that starts off with, “Hey, what about sqlite3? Why didn’t you didn’t mention that one?! I use that every day in my job as. …” πŸ™„

So there it is, for that unnamed person in the future. Enjoy. πŸ˜€