ParseKit (and Clipstart search)

The first couple versions of “Clipstart”:www.riverfold.com/software/… had a very basic search feature. You could enter keywords and it would search filenames, tags, and video titles. You could also enter special terms such as tags=christmas or imported=today, but you couldn’t mix and match different terms together.

When I started working on a more advanced search parser, I realized that I was about to write a bunch of code that surely someone had already generalized and shared with the world. Tada! “ParseKit”:parsekit.com by Todd Ditchendorf is that framework.

Clipstart 1.3 now supports these kind of searches:

christmas and (@julian or @kids)

also…

(uploaded=no and flagged=yes) or (date=2010 and @vacation)

I use ParseKit’s tokenizer to take these apart and then I translate to SQL myself for SQLite. New in 1.3, Clipstart also allows saving any search as a “smart tag” for quick access. I’m very happy with how well it’s working.

Why not use “NSPredicate”:developer.apple.com/mac/libra… and friends? I wanted more control over the parser, for example for the @kids shorthand for tags. Eventually I’ll have a more traditional NSPredicateEditor-like UI for managing searches, but I find that text input is a much quicker way to find things in my video library.

Manton Reece @manton