[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

GMail, was: Re: [sup] Please review the documentation in class Source for implementing new Sources (#113)



Hi Petr,

Take a look at Horacio's work, he has gotten pretty far doing just that!
But some of the label stuff can be very slow for large volumes atm.

His gmail.rb is well-written and relatively easy to understand:
https://github.com/hsanson/sup/tree/gmail_source

His last message to sup-devel:
http://rubyforge.org/pipermail/sup-devel/2013-July/001415.html

Also, feel free to sign up to the devel mailing list:
http://rubyforge.org/mailman/listinfo/sup-devel

or the users list, sup-talk: http://rubyforge.org/mailman/listinfo/sup-talk

Regards, Gaute

On 29. juli 2013 09:44, Petr Pudlák wrote:
> Thanks for help. To clarify, my aim is to use sup with GMail on 
> multiple computers with locally cached messages. For this to work 
> correctly I need to synchronize labels back to GMail. Since this 
> seems problematic with maildir, my idea is to:
> 
> - Store emails in a SQLite database. This way I'll get ACID 
> properties for free, as well as the possibility to add additional 
> information to messages, such as labels. Another bonus are simple 
> backups - everything is in one file. - Write a simple GMail-IMAP 
> synchronization tool that only downloads messages from _All mail_ to 
> the database and synchronizes labels back using [GMail 
> extensions](https://developers.google.com/gmail/imap_extensions#special-use_extension_of_the_list_command).
>
> 
(There could be some time limit like "download only messages newer
> than 1 year or so.) - Modify sup so that it can use this SQLite
> store and store (or copy) labels into it.
> 
> This also solves the awkward intermediate step when using
> OfflineIMAP that labels are first converted into IMAP folders,
> downloaded locally to multiple folders and then again converted to
> labels for sup (and sup needs to check multiple folders). Using
> instead one big folder that understand labels seems much cleaner.
> 
> (Perhaps it would be worth to store GMail thread ID too?)
> 
> --- Reply to this email directly or view it on GitHub: 
> https://github.com/sup-heliotrope/sup/issues/113#issuecomment-21703944
>