Showing posts with label Gmail. Show all posts
Showing posts with label Gmail. Show all posts

Tuesday, August 2, 2011

Liberate Your Data!

Google has announced a new project from the Data Liberation Front team that will eventually help you download all of your data from Google, making their job that much harder to keep you as a customer. That is fine and dandy, and will be lovely once completed, but what do we do in the mean time? I know that you keep weekly backups of your computer, and probably monthly backups of your on-line presence in at least one location away from your computer that is, at minimum secured from fire and water, right?

If you do; this article probably isn't for you. Being an avid user of Google, I'll show that, along with Facebook, and Firefox Bookmarks and Software Keys hiding on your machine.

 Gmail:
Sorry, the options are limited here, either you set up a sync with a desktop client and copy the messages you get there, or you print all of your archived messages to PDF. Please don't print them to paper, that defeats the whole purpose of email.

Google Contacts:
This one isn't too bad, in the main Gmail window open your contacts.
Then choose More Actions > Export:
From there you will get many options for export, I choose to export all of my contacts in the Google format:




Once downloaded please rename the file from google.csv to something useful, like "contacts-export-2055-02-31.csv".




Google Docs
Open up Google Docs 


Select some documents, then from the "Actions" menu, choose download.


A dialog will pop up asking you how you want to download the documents, at the top, choose the tab for All Documents, then download in any format that works for you (I choose ODT because it is an open standard that is going to be around far in to the future).


This time your export is named something appropriate, like "documents-export-2011-08-02.zip".


Facebook
Facebook isn't as nice as Google and only sometimes works, when it does, your download may take days to process; get out while you still can!

First, open your account settings:

Then select, "Download a copy" of your Facebook data.



Then, press Download twice:


Within a few days (this only works about half of the time) you will get an email telling you that your download is ready, you can then click it, login to Facebook again, and download a zip file with all of your stuff. Note that my whole Facebook probably has ten Mb of data, it isn't big by any standards, yet it still takes a long time; probably because Facebook is stuck using MySQL and PHP for half a billion users. Those MySQL databases can't handle it, so they have to have lots of redundant servers and things have started going funky recently with keeping the information in each concurrent (I've started getting notifications about the exact same message hourly recently). Get your information out before Facebook begins to have seizures and starts dumping your stuff.

Firefox Bookmarks
This isn't that big of a deal: Open your bookmarks manager, Firefox > Bookmarks > Show All Bookmarks (Ctrl + Shift + O) then from the Import and Backup dropdown choose Backup. You will get a JSON file filled with your bookmarks.

Note that recent versions of Firefox also backup locally every few weeks.

Software Keys
Use the Magical Jellybean Keyfinder free version to view the software keys on your system and save them to a text or csv file.

New: Google Takeout

This is the new technology discussed at the intro to this post, head over to google.com/takeout and choose what you want to download, eventually all Google services should appear here, but for now you get Picassa, Google Contacts, Buzz, and Google+.

Wednesday, May 25, 2011

Email Me At...

I have long looked for a feature for Gmail that will delay sending a message until a certain time. Recently I wanted to send a good friend a Happy Birthday message, right when it was her birthday (one second after midnight). If only there was some way to do that...

Luckily, I didn't have to stay up until midnight to do it, but rather cobbled together a nifty Python script that will wait until a given time, then send a message (including HTML if you have it).

#!/usr/bin/env python

import datetime
import re
import smtplib
import time

from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText

gmail_user = "yourname@gmail.com"
gmail_pwd = "MyP@$$W0Rd"

def mail(to, subject, body):
msg = MIMEMultipart('alternative')

msg['From'] = gmail_user
msg['To'] = to
msg['Subject'] = subject

if '<html>' in body:
msg.attach(MIMEText(re.sub(r'<.*?>', '', body), 'plain'))
msg.attach(MIMEText(body, 'html'))
else:
msg.attach(MIMEText(body, 'plain'))

m = smtplib.SMTP("smtp.gmail.com", 587)
m.ehlo()
m.starttls()
m.ehlo()
m.login(gmail_user, gmail_pwd)
m.sendmail(gmail_user, to, msg.as_string())
m.quit()

if __name__ == "__main__":
while datetime.datetime.today() < datetime.datetime(2011, 5, 24):
time.sleep(1)

mail("someone_else@gmail.com", "subject",
"<html><b>bold body</b> non-bold body</html>")

Things to Note:
  • Line 11-12, you will need to enter your Gmail address, along with your password in plaintext, so be careful.
  • Line 21, If the body of the message you want to send has the tag <html> it will be sent as an HTML message, all tags will also be stripped and a plaintext version will be put in the document as well.
  • Line 36, The date you use needs to be in ISO format, YYYY-MM-DD, if you want you can even add HH, MM, and SS like this:
    datetime.datetime(2011, 5, 24, 13, 5, 19)
  • Line 39: The first param is the address you are sending to, the second is the subject, and the third is the body (with or without html).
Making one of these read from a .csv file could be insanely useful.