Skip to content

Instantly share code, notes, and snippets.

View theaboutbox's full-sized avatar

Cameron Pope theaboutbox

View GitHub Profile
@theaboutbox
theaboutbox / gist:1139677
Created August 11, 2011 13:39 — forked from gruber/gist:1063605
Simple Inbox Archiving Script for Apple Mail
-- See article here: http://daringfireball.net/2007/07/simple_inbox_sweeper
-- Minor modification to archive mail in sub-folders for each year
-- e.g. Archives/2011 for all mail archived in 2011
-- This mimics Thunderbird's "Archive" functionality
-- The following should be one long line:
set _description to "All unflagged, read messages in each IMAP account inbox will be moved to the “Archive” mailbox corresponding to that account. This action is not undoable."
tell application "Mail"
display alert "Archive read messages from IMAP inboxes?" buttons {"Cancel", "Archive"} cancel button 1 message _description
#!/usr/bin/ruby
#
# Author:: Adam Jacob (<adam@opscode.com>)
# Copyright:: Copyright (c) 2010 Opscode, Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#