oniony / TMSU

TMSU lets you tags your files and then access them through a nifty virtual filesystem from any other application.
Other
2.01k stars 115 forks source link
command-line filesystem go tagging

TMSU

Build Status Go Report Card

Overview

TMSU is a tool for tagging your files. It provides a simple command-line utility for applying tags and a virtual filesystem to give you a tag-based view of your files from any other program.

TMSU does not alter your files in any way: they remain unchanged on disk, or on the network, wherever your put them. TMSU maintains its own database and you simply gain an additional view, which you can mount where you like, based upon the tags you set up.

Usage

Before you can get tagging, you'll need to initialise a TMSU database:

$ cd ~
$ tmsu init

This database will be used automatically whenever you are under that directory. In this case we created one under the home directory.

You can tag a file by specifying the file and the list of tags to apply:

$ tmsu tag banana.jpg fruit art year=2015

Or you can apply tags to multiple files:

$ tmsu tag --tags="fruit still-life art" banana.jpg apple.png

You can query for files with or without particular tags:

$ tmsu files fruit and not still-life

Mount the virtual filesystem to an empty directory:

$ mkdir mp
$ tmsu mount mp

A subcommand overview and detail on how to use each subcommand is available via the integrated help:

$ tmsu help
$ tmsu help tags

Documentation is maintained online on the wiki:

Installing

Packages

Thanks to the efforts of contributors using these platforms, packages are available for the following GNU/Linux distributions:

These packages are not maintained by me and I cannot guarantee their content.

Binary

Binary builds for a limited number of architectures and operating system combinations are available:

You will need to ensure that both FUSE and Sqlite3 are installed for the program to function. These packages are typically available with your operating system's package management system. (If you install TMSU using one of the above packages, these should be installed automatically.)

  1. Install the binary

    Copy the program binary. The location may be different for your operating system:

    $ sudo cp bin/tmsu /usr/bin
  2. Optional: Zsh completion

    Copy the Zsh completion file to the Zsh site-functions directory:

    $ cp misc/zsh/_tmsu /usr/share/zsh/site-functions

From Source

If you would rather build from the source code then please see COMPILING.md in the root of the repository.

About

TMSU itself is written and maintained by [Paul Ruane](mailto:Paul Ruane paul@tmsu.org).

The creation of TMSU is motivation in itself, but if you should feel inclinded to make a small gift via Pledgie or Bitcoin then it shall be gratefully received:

TMSU is written in Go: http://www.golang.org/

Much of the functionality the program provides is made possible by the FUSE and Sqlite3 libraries, their Go bindings and the Go language standard library.

Release Notes

v0.8.0 (in development)

v0.7.5

v0.7.4

v0.7.3

v0.7.2

v0.7.1

v0.7.0

Note: this release changes how symbolic links are handled. See below.

v0.6.1

v0.6.0

Note: this release changes the database schema by adding additional columns to the 'implication' table. TMSU will automatically upgrade your database upon first use but you may wish to take a backup beforehand.

v0.5.2

v0.5.1

v0.5.0

Note: This release has some important changes, including the renaming of some options, the introduction of local databases and a switch from absolute to relative paths in the database. Please read the following release notes carefully.

v0.4.3

v0.4.2

v0.4.1

v0.4.0

Note: This release changes the database schema to facilitate tag values. To upgrade your existing v0.3.0 database please run the following:

$ cp ~/.tmsu/default.db ~/.tmsu/default.db.backup
$ sqlite3 -init misc/db-upgrade/0.3_to_0.4.0.sql ~/.tmsu/default.db .q

v0.3.0

Note: This release changes what tag names are allowed. To ensure the tag names in your existing databases are still valid, please run the following script:

$ cp ~/.tmsu/default.db ~/.tmsu/default.db.backup
$ sqlite3 -init misc/db-upgrade/clean_tag_names.sql ~/.tmsu/default.db

Copyright 2011-2018 Paul Ruane

Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without any warranty.