Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id C4F50431FB6 for ; Mon, 10 Dec 2012 01:13:13 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 1.202 X-Spam-Level: * X-Spam-Status: No, score=1.202 tagged_above=-999 required=5 tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001, NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yCnzJOrKGqdS for ; Mon, 10 Dec 2012 01:13:13 -0800 (PST) Received: from plane.gmane.org (plane.gmane.org [80.91.229.3]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 19E8B431FAF for ; Mon, 10 Dec 2012 01:13:13 -0800 (PST) Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1ThzQN-00035j-Tv for notmuch@notmuchmail.org; Mon, 10 Dec 2012 10:13:19 +0100 Received: from arn78-1-88-186-171-7.fbx.proxad.net ([88.186.171.7]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 10 Dec 2012 10:13:19 +0100 Received: from R.M.Krug by arn78-1-88-186-171-7.fbx.proxad.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 10 Dec 2012 10:13:19 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: notmuch@notmuchmail.org From: Rainer M Krug Subject: Re: gmail importer script Date: Mon, 10 Dec 2012 10:12:57 +0100 Lines: 59 Message-ID: <50C5A799.2070201@gmail.com> References: <50c16b03.47e2440a.6038.ffffedce@mx.google.com> <50C1AEA0.9090508@gmail.com> <50C1F5C3.6010201@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: arn78-1-88-186-171-7.fbx.proxad.net User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/17.0 Thunderbird/17.0 In-Reply-To: X-Enigmail-Version: 1.5a1pre Cc: public-public-notmuch-gxuj+Tv9EO5zyzON3hdc1g-wOFGN7rlS/M9smdsby/KFg@plane.gmane.org, public-Rainer-vfylz/Ys1k4@plane.gmane.org, public-notmuch-gxuj+Tv9EO5zyzON3hdc1g@plane.gmane.org X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Dec 2012 09:13:13 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 08/12/12 14:15, Jason A. Donenfeld wrote: >> I actually prefer this approach, but I think it would be more useful to leave the syncing of >> the emails to a different program, and then just managing the labels / tags with your tool >> (which is notmuch territory). So the workflow would be: So, implementing the mail sync in >> this script would, as I see it, kind of reinventing the wheel. > > You're misunderstanding me. Let me make it very clear what the script does. Actually why don't > you just read the source code? Please? Well, Because I have never used python, and you know what your script is doing. I prefer to know what the script is doing, before I try it out and it changes up my local emails and my notmuch databases in unexpected ways, because I did not understand the source code properly? > anyway, here: > > - It looks in gmail and asks it which messages gmail has OK. > - It downloads those messages Here is my question - see below. > - It applies gmail's labels to those messages as tags Perfect. Now my final question: after reading your info which is useful, I looked in more detail at the source code and it made now sense to me. My question is: If I only want to aply the tags and *not download* emails, can I simply remove the line 88: download_new_messages(imap, database, new_messages, destination) Is this correct? In this case, the script would ony tag y messages which are already downloaded? If this is the case, I would immediately start using the script. Rainer > > The end. > > Along the way it has some smart things to reduce redundant downloads. > > For more information, consult the source code. > -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ iEYEARECAAYFAlDFp5kACgkQoYgNqgF2egqfVACfWckdCl3SOmue6EEHF1cv6d44 IKgAmwV9cQH/VxCmPHmmU6z3akQ9pFZV =vZxS -----END PGP SIGNATURE-----