Blogot - 旅とF1と車と男の嗜み

旅とF1と車と男の嗜みをテーマとした後藤康成のブログ。

Gmail を Linux へマウントする

gmail

GmailFS provides a mountable Linux filesystem which uses your Gmail account as its storage medium. GmailFS is a Python application and uses the FUSE userland filesystem infrastructure to help provide the filesystem, and libgmail to communicate with Gmail.

GmailファイルシステムLinux にマウントする Python のライブラリが話題を集めています。

Reference implemantation は以下の通り。

import libgmail

ga = libgmail.GmailAccount("google@gmail.com", "mymailismypass")

ga.login()

folder = ga.getMessagesByFolder('inbox')

for thread in folder:

 print thread.id, len(thread), thread.subject

 for msg in thread:

  print " ", msg.id, msg.number, msg.subject

  print msg.source

GmailFS - Gmail Filesystem