From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by 10.86.87.8 with SMTP id k8cs20806fgb; Sun, 7 Mar 2010 21:54:50 -0800 (PST) Received: by 10.224.79.231 with SMTP id q39mr2153498qak.163.1268027689494; Sun, 07 Mar 2010 21:54:49 -0800 (PST) Return-Path: Received: from rubyforge.org (rubyforge.org [205.234.109.19]) by mx.google.com with ESMTP id 6si10302665qwk.42.2010.03.07.21.54.49; Sun, 07 Mar 2010 21:54:49 -0800 (PST) Received-SPF: pass (google.com: domain of sup-devel-bounces@rubyforge.org designates 205.234.109.19 as permitted sender) client-ip=205.234.109.19; Authentication-Results: mx.google.com; spf=pass (google.com: domain of sup-devel-bounces@rubyforge.org designates 205.234.109.19 as permitted sender) smtp.mail=sup-devel-bounces@rubyforge.org Received: from rubyforge.org (rubyforge.org [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id EAA0F18582D5; Mon, 8 Mar 2010 00:54:48 -0500 (EST) Received: from mail-pw0-f50.google.com (mail-pw0-f50.google.com [209.85.160.50]) by rubyforge.org (Postfix) with ESMTP id 3D1951858282 for ; Mon, 8 Mar 2010 00:45:55 -0500 (EST) Received: by pwi8 with SMTP id 8so3637393pwi.23 for ; Sun, 07 Mar 2010 21:45:54 -0800 (PST) MIME-Version: 1.0 Received: by 10.115.117.19 with SMTP id u19mr2220193wam.46.1268027154598; Sun, 07 Mar 2010 21:45:54 -0800 (PST) Date: Mon, 8 Mar 2010 00:45:54 -0500 X-Google-Sender-Auth: 144a627f1576314d Message-ID: <6c0c31751003072145r13f3bdd0m37f47c71995af06e@mail.gmail.com> From: Scott Henson To: sup-devel Subject: [sup-devel] Writing changes back to sources X-BeenThere: sup-devel@rubyforge.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: Sup developer discussion List-Id: Sup developer discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============0424488540==" Sender: sup-devel-bounces@rubyforge.org Errors-To: sup-devel-bounces@rubyforge.org --===============0424488540== Content-Type: multipart/alternative; boundary=0016e64ee0a61d8cbc04814394a2 --0016e64ee0a61d8cbc04814394a2 Content-Type: text/plain; charset=ISO-8859-1 I've been working on getting writing changes back to maildirs. I've got a stab that basically re-implements sup-sync-back in its own script, but I'm not really satisfied with it. What I would like to be is create a script that will modify a source with an arbitrary sup expression. I guess some examples would be a good way to show what I am talking about. $ sup-write --drop "is:deleted" maildir:/home/user/Mail/INBOX This would drop all mail matching the expression "is:deleted" from the INBOX source. $ sup-write --archive maildir:/home/user/Mail/Archives "!label:inbox" maildir:/home/user/Mail/INBOX This would move all messages from the INBOX to Archives that have been archived. $ sup-write --store "has:mailist" maildir:/home/user/Mail/Lists This would find all messages in the Index and write them to the source. You could put any valid sup expression in the above and have it push the results out to the requested sources. You could specify multiple sources to have it applied across all of them. My thought is that you would write a series of scripts to push changes to the index down to the sources. For instance, remove all deleted mail and spam, then store labels to their own sources (good for gmail integration) and finally archive what is left. To do the above I think we probably need standardize how messages are added and removed from sources. The maildir source has store_message and delete. I would suppose that we would need to implement something similar for the other sources (is mbox the only other one left?). Does this seem to be a good idea or do we want to continue having different ways of writing back to sources? -- Scott Henson --0016e64ee0a61d8cbc04814394a2 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I've been working on getting writing changes back to maildir= s. =A0I've got a stab that basically=A0re-implements=A0sup-sync-back in= its own script, but I'm not really satisfied with it. =A0What I would = like to be is create a script that will modify a source with an=A0arbitrary= =A0sup expression. =A0I guess some examples would be a good way to show wha= t I am talking about.

$ sup-write --drop "is:deleted" maildir:/home/user= /Mail/INBOX

This would drop all mail matching the = expression "is:deleted" from the INBOX source.

$ sup-write --archive maildir:/home/user/Mail/Archives "!la= bel:inbox" maildir:/home/user/Mail/INBOX

This= would move all messages from the INBOX to Archives that have been archived= .

$ sup-write --store "has:mailist" maildir:/ho= me/user/Mail/Lists

This would find all messages in= the Index and write them to the source.

You could= put any valid sup expression in the above and have it push the results out= to the requested sources. =A0You could specify multiple sources to have it= applied across all of them. =A0My thought is that you would write a series= of scripts to push changes to the index down to the sources. =A0For instan= ce, remove all deleted mail and spam, then store labels to their own source= s (good for gmail integration) and finally archive what is left.

To do the above I think we probably need standardize ho= w messages are added and removed from sources. =A0The maildir source has st= ore_message and delete. =A0I would suppose that we would need to implement = something similar for the other sources (is mbox the only other one left?).= =A0Does this seem to be a good idea or do we want to continue having diffe= rent ways of writing back to sources?

--
Scott Henson
--0016e64ee0a61d8cbc04814394a2-- --===============0424488540== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Sup-devel mailing list Sup-devel@rubyforge.org http://rubyforge.org/mailman/listinfo/sup-devel --===============0424488540==--