用Linux命令行玩Google服務 GoogleCL項目啟動
想通過一個命令行提示符將一個文件夾內的所有照片上傳到Picasa?現在你可以用GoogleCL了。
Google宣布了新命令行工具GoogleCL,允許用戶通過命令行操控Google服務,比如輸入一行命令將一篇文章貼到Blogger,或者將視頻上傳到YouTube,將照片上傳到Picasa,為Calendar添加新活動日程,甚至在Google Docs上編輯文檔。
GoogleCL工具主要是面向Linux用戶,Mac和Windows用戶也可以用,不過要費些周折,用戶需要有Python 2.5 或2.6,Windows用戶還需要Cygwin。
以下是針對各Google服務的相關Linux命令:
Blogger:發布文章到Google博客
$ google blogger post --title "foo" "command line posting"
Calendar:添加事件到Google日歷
$ google calendar add "Lunch with Jim at noon tomorrow"
Contacts:導入Google聯系人
$ google contacts list name,email > contacts.csv
Docs:編輯Google文檔
$ google docs edit --title "Shopping list"
Picasa:上傳照片并管理相冊
$ google picasa create --album "Cat Photos" ~/photos/cats/*.jpg
Youtube:上傳視頻
$ google youtube post --category Education killer_robots.avi
相關命令使用范例可參考項目官方介紹:
http://code.google.com/p/googlecl/wiki/ExampleScripts
【編輯推薦】