Hydra maintains a central database in the user's home directory (SQLite files, usually in .hydradb). Every file that Hydra works with is fingerprinted (hashed) and it is with these fingerprints that Hydra associates tags. This has many benefits, the biggest being:
hydratag add files.jpgAdds (fingerprints) the given file(s) to the database.
hydratag add dirAdds all the image files in the given directory, and all its sub-directories.
hydratag add -t test files...Adds the files, but also add the tag test to the files too.
hydratag tag -t test files..Add the tag test to all the given files. -r tag can be used to remove tags, and -c can be used to clear all the tags for the supplied files.
hydratag listList all the files (in the current directory and all its sub-directories) and their current tags.
hydratag list -q queryList all the files that match the given query (see the query section for how to contruct tag searches/queries)
hydratag list -xList all the files, but use an XML file format as the output. Other formats that are useful include -f (just the file names) and -0 (thats a zero) (just the file names, but null terminated, suitable for xargs)
hydratag contains other commands that are not documented here (but are mentioned if you run hydratag without any parameters)
Currently, this query langauge is based on a rudamentary reverse-polish notation of sorts. Future versions may change this. This odd style is best described with a few query examples
familyA lone tag will match all records that have atleast that tag. In this example, this will match all the files that contain the family tag
work family orThis will match all entries that have either the work or family tags. Yes, the or command/operation is at the end.
family dog not andThis will match all the family files that are NOT tagged with DOG.
emptyThis is a special tag that only matches if the file has no tags at all.
vacation*This will match all files that have any tags that start with the work "vacation". So vacation-rome and vacation-paris would both match this search.