代码之家  ›  专栏  ›  技术社区  ›  Bella Dosovitsky

将融合表输入日历

  •  1
  • Bella Dosovitsky  · 技术社区  · 14 年前

    我有一个融合表,里面有我的客户数据库。其中一列是安装日期。我希望能够在谷歌日历中查看这些信息。有人有一个简单的方法来实现它吗? 谢谢

    2 回复  |  直到 14 年前
        1
  •  0
  •   Community Mohan Dere    9 年前

    我认为这个功能还不存在,但自己做并不难。

    你可以使用 one of the client libraries 对于融合表(例如。 Google APIs Client Library for PHP )然后连接到Fusion Table,获取数据并 generate an iCal file 。然后,您可以将生成的文件导入谷歌日历,也可以在网络服务器上提供脚本,并在谷歌日历中订阅生成的日历。

    我很快 put together such a script 在PHP中(网址: http://gft.rdmr.ch/examples/php/GFTCalendar.php ),也许你可以把它作为一个开始,或者只是用你最喜欢的编程语言自己做。

        2
  •  0
  •   user1315300    12 年前

    由于这看起来是一个很酷的挑战,我在这里完成了它:

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