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
/******************************************************** | |
* grab all the rows from the sheet and POST to the DB | |
********************************************************/ | |
function grabRows() { | |
var sheet = SpreadsheetApp.getActiveSheet(); | |
var rows = sheet.getDataRange(); | |
var numRows = rows.getNumRows(); | |
var values = rows.getValues(); | |
//these labels will be used to mark the fields in |
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
var Excel = require("exceljs"); | |
var fs = require("fs"); | |
function churnString(valString, dataType){ | |
let valNum = parseFloat(valString); | |
let percentageTypes = [ | |
'natWageGrowth', 'natEmpGrowth', 'natTurnoverRate', 'wgJobHolders', 'wgJobSwitchers', 'wgEntrants', | |
'wgValue', 'wgHolders', 'wgSwitchers', 'wgEntrants','empGrowth','turnover' | |
]; |
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(){ | |
//three JS files that need to be loaded one after the other | |
var libs = [ | |
'https://code.jquery.com/jquery-3.1.1.min.js', | |
'https://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.4.1/jquery.easing.min.js', | |
'https://cdnjs.cloudflare.com/ajax/libs/underscore.string/3.3.4/underscore.string.js' | |
]; | |
var injectLibFromStack = function(){ |
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
/* | |
* ajaxGET | |
* -- Custom wrapper around the Jquery GET method | |
* -- when the request is complete, it returns the response using | |
* the 'finish' callback | |
*/ | |
var ajaxGET = function(url, finish){ | |
$.get(url).done(function(data){ | |
finish(data); | |
}); |
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
console.log("---> Running"); | |
const curl = require("curl"); | |
const jsdom = require("jsdom"); | |
const url = "http://www.imdb.com/list/ls004489992/"; | |
curl.get(url, null, (err,resp,body)=>{ | |
if(resp.statusCode == 200){ | |
parseData(body); | |
} |
OlderNewer