A simple script to postpone your own email
I somewhat use email as a task manager. Honestly, I believe we all do. We process emails in the inbox, then archive or delete them when we are done with them.
However, keeping track of emails that need a follow-up on a specific date can be difficult.
Around 2011 I wrote a script to perform that task. It is a very simple IMAP parser that searches for a folder with today's date and moves all its contents to a special folder named "Today".
Let me tell you my email workflow. I understand that not everybody works in the same way, but maybe you can get some ideas to improve your email handling.
My email folder structure looks like this. The interesting part is in bold.
Inbox \_ Mailing lists \_ Project folders \_ ... \_ Deadlines \_ Today \_ Tomorrow \_ 2016-01-19 \_ 2016-02-02 ... \_ 2017-08-01
I follow the GTD methodology, which essentially states that tasks should either be done on the spot, delegated, or deferred. Thus, my inbox is exclusively for new tasks. A couple of times a day I process incoming email and, like most of us, either delete it, reply to it, forward it or —this is the interesting part— move it to one of the "Deadlines" folders.
Instead of using the inbox as the "email task manager", I use a folder named "Today". I've tried both alternatives, and I find that it works best for me. Since it separates new tasks from tasks I've already processed, I can work my entire day on "Today" and totally forget about the Inbox, even if new email is arriving.
The "Tomorrow" folder is just a shortcut so that I don't need to create a new folder with tomorrow's date every day.
As you may have guessed, the script runs once a day in a crontab, at 6 AM, and moves all mail from "Tomorrow" and the folder with tomorrow's date to "Today". That's it. And that "simple trick", as fishy marketers like to say, saves me a lot of time and headaches every day.
There is currently a commercial alternative, Boomerang, which you may find interesting if you aren't comfortable with programming. I haven't used it, so I can't comment on that. In any case, I usually prefer writing a small script rather than using a third-party service.
Update: this script by Alex Kapravelos does something very similar, and it integrates with Google Apps Scripts.
Here it is, as a Gist. The code is definitely not the best in the world, but it works. Feel free to use it, modify it (BSD license), give feedback and leave comments.
I hope that you can introduce some ideas from this methodology to your daily workflow. it can be as useful as it's been for me.
Tags: software, tricks, productivity
Use whatsapp from the command line
Update Oct 2014: Whatsapp changed their protocol and third party clients like yoswup may not work anymore.
In this post I'm going to show you how to run a commandline Whatsapp client. It can be very useful to connect it to a unix pipe and automatically get messages from your server, via Whatsapp. Also, it's cool B-)
Disclaimer: Whatsapp is sending DMCAs to take down Yowsup's Github repos, so either the software or the process may break with any update of their protocol. However, to date, I've been using it for a couple of months with no hassle.
- Download Yoswup from Gitorious and extract it somewhere
- Edit the config file and input your cc, phone and id. Leave the password blank
- We are going to force a re-auth on your phone's whatsapp in order to cache the password.
Authenticate with yowsup:
./yowsup-cli -c config -r sms
and wait for the SMS - Second step of the authentication:
./yowsup-cli -c config -R [6-digit sms code]
- Now your phone's Whatsapp is disabled. Open the app and re-auth with either a SMS or a phone call, whatever is available first. You may have to wait some minutes.
- Download iFunBox
- Connect your phone, open the iFunBox app in your computer, and navigate to
whatsapp/Library/Caches/net.whatsapp.WhatsApp
- Copy all files named Cache.db* to some place
- Download SQLiteStudio
- Open SQLiteStudio, and open the database on Cache.db. Navigate to the table
cfurl_cache_receiver_data
and scroll to the end. You will see a large json string. This is your current authentication data. - Look on the json string for
pw:XXXXXXX
. That's your password. Copy it to yowsup's config file - We are ready!
./yowsup-cli -c config -s [cc][phonenumber] "I'm texting you from a terminal"
Enjoy! Yowsup can also be used for full conversations, send messages to yourself which you'll receive on your phone or, as mentioned in the beginning of this post, pipe some other command to your phone.
Unix tricks you should be using
Some time ago I started a compilation of unix tricks regarding bash completion, obscure tools and some ssh magic.
The list grew bit by bit until it was posted to Hacker News and quickly exploded. It got about 200k visits the first day and has been accessed and linked frequently since then.
I still maintain it, and I'd like to share it again, as the first post of this blog's new era. I have been tempted to re-write it as a longer blog post many times, but I believe that many people were attracted to the simplicity of the original text file.