This file contains hidden or 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 test_parse() { | |
var file = SpreadsheetApp.getActive(); | |
var sheet = file.getSheetByName('Sheet1'); // change | |
var sets = { | |
rangeParse: sheet.getRange('L2:L16429'), // change | |
rangeResult: sheet.getRange("M2"), // change | |
func_parse: parseOkkoFilmToGetHorizontalPoster_ // change / create your function | |
}; | |
parseUrls_(sets); | |
} |
This file contains hidden or 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 readTimer() { | |
// [ 1 ]. Get report | |
var tags = ['onMinute_admin', 'onMinute_worker', 'onMinute_importer', 'onMinute_sizif1', 'onMinute_sizif2']; | |
var report = getTimerReps_(tags); | |
console.log(report); | |
// => gives 2D Array with a report about executions. | |
// So U can write it on Spreadsheet. | |
// [ 2 ]. Gat all data from logs |
This file contains hidden or 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
// TODO | |
// 1. test | |
// 2. error handler | |
// 3. instructions on trigger installation | |
// AKfycbz7GZDZb3Yt1usqUkIu_lNOp4tW0xUKuFR9K_fIksIGuep2TeJ5RU0J | |
// the script assumes this structure of historic table: | |
// ______________________________________ |
This file contains hidden or 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 someImportantFunction() { | |
// [ 1 ]. do some stuff | |
// | |
// | |
// | |
Logger.log('Success!'); | |
// [ 2 ]. Report the execution | |
var recipient = '[email protected]'; // change!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | |
// |
This file contains hidden or 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
// The function may be used to prevent conflicting launches | |
function test_PreventConflict() { | |
// Lock(1). Use Script memory | |
var key = 'any-key-you-want'; | |
var mem = PropertiesService.getScriptProperties(); | |
// Lock(2). Check if other instance of the code is running | |
var from = mem.getProperty(key); | |
if (from) { |
This file contains hidden or 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
$(".checklist-item").map(function(i, item) { | |
let text = $(item).find(".checklist-item-details-text").text(); | |
if( $(item).hasClass("checklist-item-state-complete") ) { | |
text += " (DONE)"; | |
} | |
return text; | |
}).get().join('\n') |
This file contains hidden or 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
scriptencoding utf-8 | |
let s:calendar_list = [ | |
\ ['Australian Holidays', 'en.australian#[email protected]'], | |
\ ['Austrian Holidays', 'en.austrian#[email protected]'], | |
\ ['Brazilian Holidays', 'en.brazilian#[email protected]'], | |
\ ['Canadian Holidays', 'en.canadian#[email protected]'], | |
\ ['China Holidays', 'en.china#[email protected]'], | |
\ ['Christian Holidays', 'en.christian#[email protected]'], | |
\ ['Danish Holidays', 'en.danish#[email protected]'], |
This file contains hidden or 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 launchTheForm_() { | |
// create a form-template object | |
let html = HtmlService.createTemplateFromFile('form').evaluate().setWidth(650).setHeight(1331); | |
// show the form to user | |
SpreadsheetApp.getUi().showModalDialog(html, ' '); | |
} | |
function onOpen() { | |
var ui = SpreadsheetApp.getUi(); | |
// Or DocumentApp or FormApp. |
This file contains hidden or 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
/** | |
* Invokes a function, performing up to 5 retries with exponential backoff. | |
* Retries with delays of approximately 1, 2, 4, 8 then 16 seconds for a total of | |
* about 32 seconds before it gives up and rethrows the last error. | |
* See: https://developers.google.com/google-apps/documents-list/#implementing_exponential_backoff | |
* <br>Author: [email protected] (Peter Herrmann) | |
<h3>Examples:</h3> | |
<pre>//Calls an anonymous function that concatenates a greeting with the current Apps user's email | |
var example1 = GASRetry.call(function(){return "Hello, " + Session.getActiveUser().getEmail();}); | |
</pre><pre>//Calls an existing function |
This file contains hidden or 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
// usage | |
function cars_importRef() { | |
var t = new Date(); | |
// YOUR CODE | |
Browser.msgBox('Done! The time to run function is ' + getTimeEllapse_(t)); | |
} | |
function getTimeEllapse_(t) | |
{ | |
var dif = new Date() - t; |