~codelongandpros/tigr

Tag files and retrive them later

9375d92 bump version to 0.0.1

4 months ago

410791d fix typo on line 57

4 months ago

#TIGr - tag files

TIGr (pronounced "tigger") is a sqlite-based file tagging system designed to be simple to use and powerful enough to work.

Version 0.0.1

#Building and installing

To build TIGr you will need a recent D compiler and DUB. DMD is what I use, it should work with gdc / gcc-d or ldc.

One you have dub and a compiler installed, build it using: dub build tigr --build=release To test it, run dub test -- -t 1 (Does not support multithreaded access)

To install it, copy it into a directory on your $PATH.

Full example:

$ dub test -- -t 1 # All tests should pass
$ dub build tigr --build=release
$ cp ./tigr ~/.local/bin

#Usage

#Tagging files

To add one or more tags to a file, use the -a tag in conjunction with -t.

For example, tigr -a -t eeby,deeby the_stairs will add the tags eeby and deeby to the file the_stairs.

Retagging a file (-t eeby,eeby) will only add the tag once, and emit a warning for each time you attempt to so.

$ tigr -a -t eeby,deeby the_stairs no_questions

#Listing a file's tags

To get all the tags for a file, use -l.

If there is one file, it will output each tag on a newline. For example:

$ tigr -l the_stairs
eeby
deeby

If there are two files, it will output the filename, a tabstop, and a comma-separated list of tags. For example:

$ tigr -l the_stairs no_questions
the_stairs    eeby,deeby
no_questions    eeby,deeby

#Getting a list of files with a given tag

To get all the files with a tag, use -g in conjunction with -t.

One cannot specify two tags. This would make output ambiguous.

If file a has tags 1,2, and b has 2,3, and -g 1,2 is used, does it match a only, or a and b? This may change.

$ tigr -g eeby
the_stairs
no_questions

#Removing a tag from a file

To remove one or more tags from a file, use -d with -t.

It will produce no output

For example:

$ tigr -d deeby the_stairs
$ tigr -l the_stairs
eeby