2012-08-01 26 views
1

我有一個融合表持有我的客戶數據庫。一列是安裝日期。我希望能夠在Google日曆中查看這些信息。有沒有人有一個簡單的方法來實現它? 謝謝!融合表輸入到日曆

回答

0

我不認爲這個功能已經存在,但你自己做這件事並不難。

您可以使用one of the client libraries作爲Fusion Tables(例如Google APIs Client Library for PHP),然後只需連接到您的Fusion Table,獲取您的數據和generate an iCal file。然後,您可以將生成的文件導入Google日曆,也可以只在網絡服務器上提供腳本,並在Google日曆中訂閱您生成的日曆。

我很快在put together such a script在PHP(URL:http://gft.rdmr.ch/examples/php/GFTCalendar.php),也許你可以使用它作爲一個開始或只是使用自己喜歡的編程語言自己做。

+0

我需要更多的指導 - 事先感謝您的耐心。我是第一個計時器!我將API庫與示例代碼一起上傳到我的服務器。需要一些幫助來理解我在這裏做什麼。謝謝! – 2012-08-13 19:34:11

+0

事實上,如果您有時間爲我服務,我已經準備好爲您的服務付款! – 2012-08-13 19:49:51

+0

我不認爲這是必要的。你想知道什麼?我認爲整個iCal部分不是非常困難(取決於你想使用多少「日曆」功能,但對於簡單的一天約會我的腳本將工作)。困難的部分是從您的Fusion Table中獲取數據。是公共桌還是私人桌?對於私人表,您必須具有某種登錄(ClientLogin或首選OAuth)。一旦你有了這個設置,剩下的就是編寫一個返回你想要的數據的SQL語句。 – Odi 2012-08-14 07:10:26

0

像看上去那麼一個很酷的挑戰,我在這裏完成它:

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"; 
?>