From mboxrd@z Thu Jan 1 00:00:00 1970 From: wmorgan-sup@masanjin.net (William Morgan) Date: Fri, 26 Oct 2007 20:46:58 -0700 Subject: [sup-talk] Feature Req: Command line search/display options In-Reply-To: <471361DE.9040008@quintic.co.uk> References: <471361DE.9040008@quintic.co.uk> Message-ID: <1193456434-sup-4612@south> Excerpts from Marcus Williams's message of Mon Oct 15 05:49:34 -0700 2007: > I'd like to add some command line options to search/display messages, > because then I can script using sup outside of sup as it were. In SVN there's a devel/console.sh, which shows how to hook into Sup without invoking the interface. Here are some examples: > sup --search "some search term" $ sh devel/console.sh [Fri Oct 26 20:37:55 -0700 2007] loading index... [Fri Oct 26 20:37:55 -0700 2007] loaded index of 63434 messages >> Index.index.search_each("potato") { |id, score| m = Index.build_message(id); puts "[#{id}] [#{m.from}] [#{m.subj}]" } [65155] [William Morgan ] [potato] [20758] [Sam Smoot ] [Declaring instance variables dynamically] [6048] [David Balmain ] [[Ferret-talk] hello, acts_as_ferret questions, any help greatly appreciate] [6047] [koloa ] [[Ferret-talk] hello, acts_as_ferret questions, any help greatly appreciate] [2251] [William Morgan ] [lunch today] > sup --display someid0 >> puts Index.build_message(6047).raw_message From ferret-talk-bounces at rubyforge.org Mon Oct 09 08:17:37 2006 [...] You can submit a patch that adds --search and --display options to bin/sup, if you like. -- William