restatomic.blogg.se

Gmail autopurge script
Gmail autopurge script







gmail autopurge script

the system encounted a problem (#007)" error. In addition to that, I found that after an hour or so I'd hit the same problem as before with the "Oops.

gmail autopurge script

I left this running for an hour and found that it deleted a fair amount of e-mail but even at 50 e-mails every 8 seconds or so, that's still 6.2 hrs to delete them all! There is a dodgy sleep at the end as I was finding the gmail interface was returning a little slowly after a while and it took a good 5 seconds to return so I could then reselect the mail on screen. I then iterate the key press sequence 28,000 times. I also had to make sure I was entering the keypress in the correct window, which is what the search for Iceweasel does (Iceweasel is the Debian name for Firefox) and then activates that window or brings it to the foreground. It took me a little while to work out #/hash or pound in the US was denoted by 'numbersign' on my keyboard, although I'm not really sure why. Xdotool windowactivate $WID for i in `` do echo $i #!/bin/bash -x WID = `xdotool search -desktop 0 "Iceweasel" | head -1 ` With a little work I found out the key presses I needed were: "xdotool lets you programatically (or manually) simulate keyboard input and mouse activity, move and resize windows, etc." It turns out 'xdotool' was the tool for the job, the man page puts it best: However, I thought I'd have some fun before that! How about I enable keyboard shortcuts in gmail and then automate the keypresses?!? That sounded like fun and made me feel like a kid in school.Įnabling the advanced keyboard shortcuts via the gmail settings is required:Īfter which I looked up the keyboard shortcuts and then looked for a tool to do the job. I knew at this point I should probably dig out an e-mail client or script to connect via imap and mark the e-mails as deleted as I was reaching a limitation in the gmail web interface. With that approach this would take a lot of time!īut wait - you can select all e-mails/conversations with that label and hit delete: However, that only deleted 50 e-mails at a time: I figured out pretty quickly that although I could use the mouse and click on 'Select All' mail with the label "LKML", and then hit delete: This turned out to be a little harder than I had expected! Method 1 - Clickity-Click

gmail autopurge script

#Gmail autopurge script free#

and after finding I had over 140k e-mails from LKML I thought I'd delete those and free up some space. The list has all patches and discussions related to Linux kernel development which can be very heavy going!įast-forward to 2015 and I realised I was running low on google mail storage. Those that know the LKML will know why my reading streak didn't last long due to the shere number of e-mails and the technical nature of them. At some point in 2011, I decided to start reading the Linux Kernel Mailing List (LKML), so I subscribed to the list from my gmail account.









Gmail autopurge script