Archive of RubyForge sup-devel mailing list
 help / color / mirror / Atom feed
* [sup-devel] Writing changes back to sources
@ 2010-03-08  5:45 Scott Henson
  2010-03-12 15:22 ` Ben Walton
  0 siblings, 1 reply; 2+ messages in thread
From: Scott Henson @ 2010-03-08  5:45 UTC (permalink / raw)
  To: sup-devel


[-- 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [sup-devel] Writing changes back to sources
  2010-03-08  5:45 [sup-devel] Writing changes back to sources Scott Henson
@ 2010-03-12 15:22 ` Ben Walton
  0 siblings, 0 replies; 2+ messages in thread
From: Ben Walton @ 2010-03-12 15:22 UTC (permalink / raw)
  To: sup-devel


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

Excerpts from Scott Henson's message of Mon Mar 08 00:45:54 -0500 2010:

> 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?

This is overall a good idea, I think.  I haven't looked at this in
some time, so my memory may be off or the code changed in the interim,
but if you did something like this, you could like do away with
SentManager completely.  Without the addition support of the mbox
store_message method, it would be a skeleton for default_set_source
(or whatever that method is)...at which point that functionality could
be handled differently.

Just a few (hopefully valid and useful) thoughts.

Thanks
-Ben

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

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

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-03-12 15:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-08  5:45 [sup-devel] Writing changes back to sources Scott Henson
2010-03-12 15:22 ` Ben Walton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox