This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: fetch website and commit results | |
on: | |
schedule: | |
- cron: "30 * * * *" | |
jobs: | |
build: | |
runs-on: ubuntu-latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> | |
<script type="text/javascript" src="https://www.google.com/jsapi"></script> | |
<script type="text/javascript"> | |
google.load('visualization', '1', {packages: ['corechart', 'controls']}); | |
google.setOnLoadCallback(drawDashboard); | |
function drawDashboard() { | |
var query = new google.visualization.Query('你的Google Sheet的共用URL'); | |
query.send(handleQueryResponse); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?!= include('getGraphicData'); ?> | |
<div id="dashboard_div" style="border: 1px"> | |
<div id="chart1_div" style="height: 290px;"></div><br/> | |
<div id="chart2_div" style="height: 180px;"></div><br/> | |
<div id="chart3_div" style="height: 180px;"></div><br/> | |
<div id="control_div" style="height: 50px;"></div><br/> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> | |
<script type="text/javascript" src="https://www.google.com/jsapi"></script> | |
<script type="text/javascript"> | |
google.load("visualization", "1", {packages:["corechart"]}); | |
function drawVisualization() { | |
// To see the data that this visualization uses, browse to | |
var url = "<Put your own Google Sheet sharing URL here, with editing enabled>"; | |
$("#method").html("以下使用google.visualization.Query方法來處理數據"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?!= include('getGraphicData'); ?> | |
<div id="method" align="center"></div><br/> | |
<div id="chart"></div> | |
<div id="source1" align="center"></div><br/> | |
<div id="auth" align="center"></div><br/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function doGet() { | |
return HtmlService.createTemplateFromFile("index.html") | |
.evaluate() | |
.setSandboxMode(HtmlService.SandboxMode.IFRAME); | |
} | |
function include(filename) { | |
return HtmlService.createHtmlOutputFromFile(filename) | |
.setSandboxMode(HtmlService.SandboxMode.IFRAME) | |
.getContent(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> | |
<script type="text/javascript" src="https://www.google.com/jsapi"></script> | |
<script type="text/javascript"> | |
google.load("visualization", "1", {packages:["corechart"]}); | |
google.setOnLoadCallback(getSpreadsheetData); | |
function getSpreadsheetData() { | |
$("#auth").html("免責聲明:以下資料與圖片內容皆為教學使用,勿作為投資之依據,所有內容將不負任何投資盈虧之責!!!"); | |
google.script.run.withSuccessHandler(getSGXPicData).getSGXData(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?!= include('getGraphicData'); ?> | |
<div id="auth" align="center"></div><br/> | |
<div id="chart"></div><br/> | |
<div id="chart2"></div><br/> | |
<div id="source" align="center"></div><br/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function doGet() { | |
return HtmlService | |
.createTemplateFromFile("index.html") | |
.evaluate() | |
.setSandboxMode(HtmlService.SandboxMode.IFRAME); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function doGet() { | |
return HtmlService.createTemplateFromFile("index.html") | |
.evaluate() | |
.setSandboxMode(HtmlService.SandboxMode.IFRAME); | |
} | |
function include(filename) { | |
return HtmlService.createHtmlOutputFromFile(filename) | |
.setSandboxMode(HtmlService.SandboxMode.IFRAME) | |
.getContent(); |
NewerOlder