Archive of RubyForge sup-devel mailing list
 help / color / mirror / Atom feed
From: Scott Henson <scott@foolishpride.org>
To: sup-devel <sup-devel@rubyforge.org>
Subject: [sup-devel] Writing changes back to sources
Date: Mon, 8 Mar 2010 00:45:54 -0500	[thread overview]
Message-ID: <6c0c31751003072145r13f3bdd0m37f47c71995af06e@mail.gmail.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 1680 bytes --]

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

[-- Attachment #1.2: Type: text/html, Size: 2055 bytes --]

[-- Attachment #2: Type: text/plain, Size: 143 bytes --]

_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel

             reply	other threads:[~2010-03-08  5:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-08  5:45 Scott Henson [this message]
2010-03-12 15:22 ` Ben Walton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6c0c31751003072145r13f3bdd0m37f47c71995af06e@mail.gmail.com \
    --to=scott@foolishpride.org \
    --cc=sup-devel@rubyforge.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox