From mboxrd@z Thu Jan 1 00:00:00 1970 From: wmorgan-sup@masanjin.net (William Morgan) Date: Fri, 07 Mar 2008 07:52:40 -0800 Subject: [sup-talk] How to search for and mass tag thousands of emails? In-Reply-To: <15885391.post@talk.nabble.com> References: <15885391.post@talk.nabble.com> Message-ID: <1204904692-sup-7926@south> Reformatted excerpts from rodneyk's message of 2008-03-06: > I have a giant inbox mbox with thousands of emails which I want to > starting using in sup. I can easily search and tag to categorize them > all, however, I can only tag the current screen full of search > results. Is there a way to tag all the search results, and not just > the results on screen? You could do it through the GUI, but that probably won't scale well. A better approach is to use the before-add-hook as Manish said, or to use the development console to modify the index directly. Feed devel/console.sh something like (untested): Index.index.search_each("potato") do |id, score| m = Index.build_message(id) puts "[#{id}] [#{m.from}] [#{m.subj}]" m.add_label :potato m.save! Index end But there's not really much of a point to labeling the results of a (simple) search. Labels are good for things that are hard to search for; for everything else, just trust in the search! > Being able to import existing mail and quickly organize is probably > something most new users will need to do. Sup supports auto-labeling folders out of the box, which I think is the most common transition case. > I also checked out sup from the git repo, and can run devel/console, > so if this mass tagging can only be done manually, I can do it, as I'm > pretty proficient with ruby. The big advantaage of the git repo (the next branch, at least) right now is that adding labels to a message is much faster. -- William