Earlier this year John Day posted about using time-based Gmail filters with Google Apps Script to aut…

Earlier this year John Day posted about using time-based Gmail filters with Google Apps Script to automatically archive and delete mail after a certain amount of time, since Google introduced the tabbed inbox I have used Johns example functions to come up with a function that will automatically delete mail from the Promotions category after 1 month and a second function that will automatically archive mail from the Social, Updates and Forums categories after 1 month.

function batchDeletePromotions() {
  var batchSize = 100 // Process up to 100 threads at once
  var threads = GmailApp.search('category:promotions older_than:1m');
  for (j = 0;j < threads.length;j+=batchSize) {
    GmailApp.moveThreadsToTrash(threads.slice(j,j+batchSize));
  }
}

function batchArchiveCategories() {
  var myCategories = {'"updates"':"1m",'"forums"':"1m",'"social"':"1m"};  
  var batchSize = 100; // Process up to 100 threads at once
  for(aCategory in myCategories) {
    var threads = GmailApp.search('label:inbox category:'+aCategory+' older_than:'+myCategories[aCategory]+'');
    for (j = 0;j < threads.length;j+=batchSize) {
      GmailApp.moveThreadsToArchive(threads.slice(j,j+batchSize));
    }
  }  
}

Check out John's post for the details about how to use them at //www.johneday.com/422/time-based-gmail-filters-with-google-apps-script

Time for a new Kindle

I purchased my Kindle Keyboard back in 2010, since then it has served me well, the only real problem I have with it now is that there is a crack in the body running out of the bottom left corner of the screen which is slowly getting longer.

Back in September Amazon announced a refreshed line of Kindles which includes the Kindle Paperwhite which just happens to be front-lit and since I read mostly a night I thought that was a good idea and then I found out that it wouldn't be hitting the UK any time soon, I guessed March/April. How wrong I was because imagine my surprise when I visited the Amazon UK homepage last night to be met by the customary letter from Jeff Bezos introducing the Kindle Paperwhite to these shores.

So given the damage to my Kindle Keyboard and the amount of late night reading I do I immediately decided to pre-order a Kindle Paperwhite, they are scheduled to be released on 25th October but given the amount of demand I bet they run out fast. Hopefully I won't have too long to wait and may even get it by the end of the month.

I took a look at the customer discussion forum this morning over on the Amazon UK website was amused to find people angry about this new Kindle with built in light, with a number of people demanding a software update for their few months old Kindle Touch to enable the lights for them, how thick are some people that they think a software update can magic a piece of hardware into their last generation Kindle device.