首页 > 学院 > 电脑知识 > 正文

Google 发布 Command Line Tool,通过命令行操作 Google 各种服务

2020-03-20 16:29:57
字体:
来源:转载
供稿:网友

命令行控们总是希望用键盘搞定一切,于是Google发布了GoogleCL(Google Command Line Tool),通过命令行即可操作Google各种服务。比如你想批量将硬盘里某个文件夹里的所有图片创建一个Picasa相册?输入以下命令:
$ google picasa create --title "My album" ~/Photos/vacation/*.jpg

再比如你想将硬盘里的某个网页发布为一篇Blogger博文、增加一个Google Calendar的日程、编辑一篇Google Docs文档:

$ google blogger post --blog "My blog" --tags "python, googlecl, development" my_post.html
$ google calendar add "Lunch with Jason tomorrow at noon"
$ google docs edit --title "Shopping list" --editor vim

GoogleCL(Google Command Line Tool)是标准的Python应用,使用Python gdata库来通过命令行使Google Data API直接操作各种Google服务。

在这里还有一些更多的例子,提供.deb包下载,Google希望随着GoogleCL加入更多功能,能在今后进入Debian和Ubuntu里。

Via Open Source at Google


发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表