From mboxrd@z Thu Jan 1 00:00:00 1970 From: wmorgan-sup@masanjin.net (William Morgan) Date: Tue, 30 Oct 2007 14:54:36 -0700 Subject: [sup-talk] Refreshing inbox & removing +inbox label In-Reply-To: <20071025125724.GA5250@lenin.sovietwar.org> References: <0a4e8b9700043d81@IMSS-WIN> <472063D9.40704@quintic.co.uk> <20071025114926.88e91efb.alexander.panek@brainsware.org> <20071025125724.GA5250@lenin.sovietwar.org> Message-ID: <1193781249-sup-5262@south> Excerpts from vasudeva's message of Thu Oct 25 05:57:24 -0700 2007: > That seems useful to me. Say you've got 3000 messages labeled, and now > you want to change the label without painstakingly loading them all > into your view. Maybe you've just finished syncing ten trillion > emails from your old mbox sources and realize you didn't plan your > label strategy very well... This could be done fairly easily with the console (only in SVN right now, but I could package it in the gems as well). Something like: $ sh devel/console.sh [Tue Oct 30 14:47:24 -0700 2007] loading index... [Tue Oct 30 14:47:24 -0700 2007] loaded index of 64258 messages >> Index.ferret.search_each("label:sup") do |id, score| m = Index.build_message id m.labels -= [:sup] m.labels += [:potato] Index.sync_message m end >> Index.ferret.optimize -- William