Re: gmail importer script

2012-12-17 Thread Patrick Totzke
BTW: I removed the whole maildir contents and restarted the downlowd over night. here's the result: --- Traceback (most recent call last):2| | 26% ETA:

Re: gmail importer script

2012-12-16 Thread Jason A. Donenfeld
On Sat, Dec 15, 2012 at 11:41 AM, Patrick Totzke patricktot...@gmail.comwrote: Well, thats not the point.. the script shouldn't die like this. I think it's be better if the script caught that exception, deleted the file and continued.. Probably, but I suspect it's related to whatever

Re: gmail importer script

2012-12-16 Thread Patrick Totzke
Quoting Jason A. Donenfeld (2012-12-16 20:44:04) On Sat, Dec 15, 2012 at 11:41 AM, Patrick Totzke patricktot...@gmail.com wrote: Well, thats not the point.. the script shouldn't die like this. I think it's be better if the script caught that exception, deleted the file and

Re: gmail importer script

2012-12-15 Thread Jason A. Donenfeld
On Thu, Dec 13, 2012 at 5:48 PM, Patrick Totzke patricktot...@gmail.comwrote: notmuch.errors.FileNotEmailError Delete the file it dies on and try again. ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch

Re: gmail importer script

2012-12-15 Thread Patrick Totzke
Quoting Jason A. Donenfeld (2012-12-15 08:22:46) On Thu, Dec 13, 2012 at 5:48 PM, Patrick Totzke patricktot...@gmail.com wrote: notmuch.errors.FileNotEmailError Delete the file it dies on and try again. Well, thats not the point.. the script shouldn't die like this. I think it's

Re: gmail importer script

2012-12-13 Thread fREW Schmidt
On Thu, Dec 13, 2012 at 03:30:19PM +0100, Jason A. Donenfeld wrote: Please don't reply offlist. This is message #2 that's been sent offlist. Oh I'm sorry, that was an accident. On Thu, Dec 13, 2012 at 3:22 PM, fREW Schmidt fri...@gmail.com One thing you might want to try is to only open the

Re: gmail importer script

2012-12-13 Thread Jason A. Donenfeld
On Thu, Dec 13, 2012 at 3:35 PM, fREW Schmidt fri...@gmail.com wrote: I just mean a general programming technique. As you get information about tags you hold them in memory and then sync it later and clear your memory. Oh, yea, that's a great idea. I'll play with that. Good thinking.

Re: gmail importer script

2012-12-13 Thread fREW Schmidt
On Thu, Dec 13, 2012 at 03:28:30PM +0100, Jason A. Donenfeld wrote: On Thu, Dec 13, 2012 at 3:19 PM, fREW Schmidt fri...@gmail.com wrote: Okay, I've updated it to dynamically find the All Mail folder. I can't seem to find it now, but I read that Gmail actually localizes the name of

Re: gmail importer script

2012-12-13 Thread Jason A. Donenfeld
\AllMail is the unlocalized generic version that maps to the localized version, as are all the other back slash situations. ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch

Re: gmail importer script

2012-12-13 Thread Patrick Totzke
Sorry, I'm misusing this thread as a bugtracker.. Traceback (most recent call last):4| | 10% ETA: 1:24:41 3.54 emails/s File ./gmail-notmuch.py, line 251, in module main() File

Re: gmail importer script

2012-12-11 Thread Patrick Totzke
Quoting Jason A. Donenfeld (2012-12-11 07:06:22) On Mon, Dec 10, 2012 at 6:46 PM, Jason A. Donenfeld ja...@zx2c4.com wrote: On Mon, Dec 10, 2012 at 10:41 AM, Patrick Totzke patricktot...@gmail.com wrote: It would, but its nicer not to load ressources you're not gonna

Re: gmail importer script

2012-12-11 Thread Jason A. Donenfeld
It seems to work, but i'm still waiting for the first run-through. Downloading messages: 457 of 22831| This takes ages. I hope it doesn't try to re-download all my messages everytime. Nope. It's very smart about not doing that. Another thing: It seems that throughout its run, your

Re: gmail importer script

2012-12-11 Thread Patrick Totzke
Quoting Jason A. Donenfeld (2012-12-11 09:12:56) It seems to work, but i'm still waiting for the first run-through. Downloading messages: 457 of 22831| This takes ages. I hope it doesn't try to re-download all my messages everytime. Nope. It's very smart about not doing

Re: gmail importer script

2012-12-10 Thread Rainer M Krug
-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

Re: gmail importer script

2012-12-10 Thread Patrick Totzke
Quoting Jason A. Donenfeld (2012-12-09 23:13:12) On Sat, Dec 8, 2012 at 6:46 PM, Patrick Totzke patricktot...@gmail.com wrote: ZeroDivisionError: float division by zero Fixed it! Sorry about all this... Jeeze Louise.  thx Another feature request: Could you make the

Re: gmail importer script

2012-12-10 Thread Jason A. Donenfeld
On Mon, Dec 10, 2012 at 10:41 AM, Patrick Totzke patricktot...@gmail.comwrote: It would, but its nicer not to load ressources you're not gonna use. Also, progressbar 2.2 seems to be the newest version you see on a reasonably new debian/ubuntu install.. /nitpick I'll consider it. Next

Re: gmail importer script

2012-12-10 Thread Rainer M Krug
On 7 December 2012 16:32, Jason A. Donenfeld ja...@zx2c4.com wrote: On Fri, Dec 7, 2012 at 2:57 PM, Rainer M Krug r.m.k...@gmail.com wrote: 2) I am downloading with the patched notmuch (to add x-keywords containing the labels) only the All Mail folder - does your script use this

Re: gmail importer script

2012-12-10 Thread Jason A. Donenfeld
On Mon, Dec 10, 2012 at 6:46 PM, Jason A. Donenfeld ja...@zx2c4.com wrote: On Mon, Dec 10, 2012 at 10:41 AM, Patrick Totzke patricktot...@gmail.comwrote: It would, but its nicer not to load ressources you're not gonna use. Also, progressbar 2.2 seems to be the newest version you see on a

Re: gmail importer script

2012-12-09 Thread Jason A. Donenfeld
On Sat, Dec 8, 2012 at 6:46 PM, Patrick Totzke patricktot...@gmail.comwrote: ZeroDivisionError: float division by zero Fixed it! Sorry about all this... Jeeze Louise. Another feature request: Could you make the progressbar stuff optinal? in the end one will want to run this via cronjob

Re: gmail importer script

2012-12-08 Thread Jason A. Donenfeld
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,

Re: gmail importer script

2012-12-08 Thread Patrick Totzke
Quoting Jason A. Donenfeld (2012-12-07 13:49:46) Not sure what is causing this. My best guess is that your password was incorrect and that I'm not checking the login return value. Yes, you're right, it was an incorrect passwd. One thing you also might want to watch out for is

Re: gmail importer script

2012-12-08 Thread Jason A. Donenfeld
On Sat, Dec 8, 2012 at 5:20 PM, Patrick Totzke patricktot...@gmail.com wrote: I have two new errors: - ./gmail-notmuch.py -u patricktot...@gmail.com -p mypwd ~/mail/gmail/ I also tried with maildir param ~/mail/gmail/\[Google\

Re: gmail importer script

2012-12-08 Thread Jason A. Donenfeld
On Sat, Dec 8, 2012 at 6:04 PM, Jason A. Donenfeld ja...@zx2c4.com wrote: BTW: I had to change the hardcoded [Gmail] to [Google Mail] for it to get that far. Really? Are you in the UK? I'll have to do this dynamically using the XLIST imap extension. Okay, I've updated it to dynamically find

Re: gmail importer script

2012-12-08 Thread Patrick Totzke
Quoting Jason A. Donenfeld (2012-12-08 17:04:48) On Sat, Dec 8, 2012 at 5:20 PM, Patrick Totzke patricktot...@gmail.com wrote: I have two new errors: - ./gmail-notmuch.py -u patricktot...@gmail.com -p mypwd ~/mail/gmail/ I also

Re: gmail importer script

2012-12-07 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 07/12/12 05:05, Kushal Kumaran wrote: Jason A. Donenfeld ja...@zx2c4.com writes: Hi folks, I wrote a script that imports emails and tags from gmail. It's resumable and appears to be working reasonably well. I could use some experienced

Re: gmail importer script

2012-12-07 Thread Patrick Totzke
Is this supposed to happen? - Logging in... Selecting all mail... Discovering local messages... Receiving message list... Traceback (most recent call last): File ./gmail-notmuch.py, line 175, in module main() File ./gmail-notmuch.py, line 58, in

Re: gmail importer script

2012-12-07 Thread Jason A. Donenfeld
On Fri, Dec 7, 2012 at 9:53 AM, Rainer M Krug r.m.k...@gmail.com wrote: Sounds interesting. I don't know much python, so excuse my questions: 1) are multiple downloads of an email done, if the mail has multiple labels? No. 2) I am downloading with the patched notmuch (to add x-keywords

Re: gmail importer script

2012-12-07 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 07/12/12 14:48, Jason A. Donenfeld wrote: On Fri, Dec 7, 2012 at 9:53 AM, Rainer M Krug r.m.k...@gmail.com mailto:r.m.k...@gmail.com wrote: Sounds interesting. I don't know much python, so excuse my questions: 1) are multiple

Re: gmail importer script

2012-12-07 Thread Jason A. Donenfeld
On Fri, Dec 7, 2012 at 2:48 PM, Jason A. Donenfeld ja...@zx2c4.com wrote: 3) are label changes in gmail synched into the local emails? It pulls labels from gmail messages into notmuch, with the labels in tact, once per each email. Okay, it's way more robust now. Just updated it. Now it

Re: gmail importer script

2012-12-07 Thread Jason A. Donenfeld
On Fri, Dec 7, 2012 at 2:57 PM, Rainer M Krug r.m.k...@gmail.com wrote: 2) I am downloading with the patched notmuch (to add x-keywords containing the labels) only the All Mail folder - does your script use this information (if present) to tag the emails? What is the patched

Re: gmail importer script

2012-12-06 Thread Kushal Kumaran
Jason A. Donenfeld ja...@zx2c4.com writes: Hi folks, I wrote a script that imports emails and tags from gmail. It's resumable and appears to be working reasonably well. I could use some experienced eyes looking at it, as my first exposure to notmuch was just a few hours ago.