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 main() { | |
var videos = YouTube.Search.list('snippet', { | |
type: 'video', | |
maxResults: 50, | |
forMine: true | |
}); | |
var allVideos = videos.items; | |
while(videos.nextPageToken) { |
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 getClassroomRosters() { | |
var courses = Classroom.Courses.list().courses; | |
var email = Session.getActiveUser().getEmail(); | |
for(var i = 0; i < courses.length; i++) { | |
var courseState = courses[i].courseState; | |
var teacher = Classroom.Courses.Teachers.get(courses[i].id, email); | |
var isTeacher = teacher.userId === courses[i].ownerId; | |
if (courseState == "ACTIVE" && isTeacher) { |
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 onOpen() { | |
DocumentApp.getUi() | |
.createAddonMenu() | |
.addItem('run', 'spaceErase') | |
.addToUi(); | |
} | |
function spaceErase() { | |
var body = DocumentApp.getActiveDocument().getBody(); | |
body.replaceText('(\\s{2})', ' '); |
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 Course(name, students) { | |
this.name = name; | |
this.students = students; | |
} | |
function getRosters() { | |
var courses = Classroom.Courses.list().courses; | |
var sheetData = []; | |
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 signReports() { | |
var folderId = '<<PUT THE ID OF YOUR FOLDER WITH DOCS TO APPEND IMAGES TO>>'; | |
var imageId = '<<PUT THE ID OF THE IMAGE TO APPEND HERE>>'; | |
var files = DriveApp.getFolderById(folderId).getFilesByType(MimeType.GOOGLE_DOCS); | |
while(files.hasNext()) { | |
var file = files.next(); | |
var doc = DocumentApp.openById(file.getId()); | |
var image = DriveApp.getFileById(imageId); |
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
init by gas-hub, just delete this file. |
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
init by gas-hub, just delete this file. |
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 getDocs() { | |
var folderId= '<<PUT YOUR FOLDER ID HERE>>'; | |
var pdfFolder = DriveApp.getFolderById(folderId).createFolder('PDFs'); | |
var files = DriveApp.getFolderById(folderId).getFilesByType(MimeType.GOOGLE_DOCS); | |
while(files.hasNext()) { | |
var file = files.next(); | |
var pdf = file.getAs('application/pdf'); |
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
init by gas-hub, just delete this file. |
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
/** | |
* Creates a custom menu in Google Sheets when the spreadsheet opens. | |
*/ | |
function onOpen() { | |
SlidesApp.getUi().createMenu('Picker') | |
.addItem('Start', 'showPicker') | |
.addToUi(); | |
} | |
/** |