tdb

tag database, a booru in your terminal
Log | Files | Refs | README

README.md (1098B)


      1 # Tag Database
      2 
      3 This is a system for managing tag <-> file associations. It consists of
      4 two files, `tags` and `sha`, and a script `tdb`.
      5 
      6 `sha` stores lines of sha1 hashes and filenames, separated by two
      7 spaces, as emitted by `sha1sum(1)`.
      8 
      9 `tags` stores lines of tag names and sha1 hashes, separated by a
     10 tab symbol.
     11 
     12 `tdb` manipulates these files to perform tag based searches.
     13 
     14 ## Install
     15 
     16 There's no install. Just drop `tdb` in a directory with your files,
     17 and launch it from there.
     18 
     19 ## Dependencies
     20 
     21 `tdb` is writen in `rc(1)` shell script. It's provided by `plan9port`
     22 
     23 ## Usage
     24 
     25 Generate sha file:
     26 
     27 	$ ./tdb hash photos > sha
     28 
     29 Tag a file:
     30 
     31 	$ ./tdb tag photos/joe.jpg joe friend night beer my_car
     32 
     33 Untag a file:
     34 
     35 	$ ./tdb untag photos/joe.jpg friend
     36 
     37 Look for files:
     38 
     39 	$ ./tdb get joe
     40 	photos/joe.jpg
     41 	photos/crash.jpg
     42 	photos/hospital.jpg
     43 
     44 Combine it with `sxiv(1)`:
     45 
     46 	$ ./tdb get landscape | sxiv -it
     47 
     48 ## Bugs
     49 
     50 - Tagging files is too much work.
     51 - `tdb` might require slight modifications to work on plan9
     52 - tree walk code in `hash` function might break if your directory tree is too big.
     53