Reformatted excerpts from Marc Hartstein's message of 2009-05-13:
> Has anybody done anything like this? Any code snippets?
I really need to clean up the code so that all of Sup's special query
parsing (chronic, contact aliases, etc.) is accessible, but you can do
simple queries directly through the Ferret API with a script like:
require 'sup'
i = Redwood::Index.new
i.load
puts "total unread: " + i.ferret.search("label:unread").total_hits
puts "inbox unread: " + i.ferret.search("label:unread AND
label:inbox").total_hits
That gets you the number of messages, not the number of threads. (Sup
doesn't store the latter.)
--
William <[email protected]>
_______________________________________________
sup-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/sup-talk