【发布时间】:2012-08-01 21:32:33
【问题描述】:
我有一个包含我的客户数据库的融合表。一栏是安装日期。我希望能够在谷歌日历中查看该信息。有没有人有一个简单的方法来实现它? 谢谢!
【问题讨论】:
我有一个包含我的客户数据库的融合表。一栏是安装日期。我希望能够在谷歌日历中查看该信息。有没有人有一个简单的方法来实现它? 谢谢!
【问题讨论】:
我不认为这个功能已经存在,但自己做这个并不难。
您可以将one of the client libraries 用于融合表(例如Google APIs Client Library for PHP),然后只需连接到您的融合表,获取您的数据和generate an iCal file。然后,您可以将生成的文件导入 Google 日历,或者将您的脚本放在网络服务器上,然后在 Google 日历中订阅您生成的日历。
我很快在 PHP 中 put together such a script(网址:http://gft.rdmr.ch/examples/php/GFTCalendar.php),也许你可以从它开始,或者只是使用你最喜欢的编程语言来自己做。
【讨论】:
因为它看起来是一个很酷的挑战,所以我在这里完成了它:
https://github.com/fontanon/google-fusiontables2calendar
它提供了一个配置文件,方便大家进行设置:
<?php
// ::auth config::
// Google Public API Access Key. Don't forget to activate Google API for fusion tables
// Get one and configure access and perms at https://console.developers.google.com
$API_KEY="add yours";
// ::fusion tables config::
// The Fusion Tables ID (find it at fusion tables URL: the docid param)
$TABLE_ID="add yours";
// Name of columns to retrieve from the fusion table, separated by ','.
// Below ones are mandatory for building the calendar, and its position sensitive.
$COL_NAMES="summary,description,start,end,location,url";
// Date format in the fusion table. Examples: d/M/Y, Y-M-d H:i:s, YMdTHisZ ...
$DATE_FORMAT="add yours";
// ::calendar config::
// Name of your calendar
$CAL_NAME="add yours";
// Description of your calendar
$CAL_DESC="add yours";
// Timezone of your calendar. Examples: US/Pacific, Europe/Madrid
$CAL_TZ="add yours";
?>
【讨论】: