by Smudge · 12y ago · 0 comments
goim search '%homer%' {show:simpsons} {sort:rank desc} {limit:5} {votes:100-}
And if you're like me and rip episodes off your Simpsons DVDs that are named "S04E12.mkv", then you can rename all of them in one swoop: goim rename -tv 'the simpsons' *.mkv
It will automatically find the `S04E12` in the file names to get the correspondence between episodes.Of course, the database has more than Simpsons episodes in it (and renaming works with movies too), but it's my go-to example. :-)
Want to try it out? It's easy. Make sure you have Go installed, then install and load and search:
go get github.com/BurntSushi/goim # ~ 30 seconds (compiles SQLite)
goim load -db goim.sqlite # ~ 1 minute, only movies/tv shows
goim search -db goim.sqlite '%homer%' {show:the simpsons}
Loading/searching is a bit slower with SQLite than with PostgreSQL, but it's more convenient. (e.g., The search command above is over 12x faster with PostgreSQL on my system.)