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
| import requests | |
| import json | |
| import os | |
| import youtube_dl | |
| PANOPTO_BASE = "https://cardiff.cloud.panopto.eu" | |
| """ | |
| Place the value of your .ASPXAUTH token in the following variable | |
| """ |
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
| cd | |
| # you can do this all in one command | |
| wget -qO- http://dl-cdn.alpinelinux.org/alpine/v3.12/main/x86/apk-tools-static-2.10.5-r1.apk | tar -xz sbin/apk.static && ./sbin/apk.static add apk-tools && rm sbin/apk.static | |
| apk add python3 |
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
| apk add py3-pip | |
| pip3 install youtube-dl | |
| # download video | |
| youtube-dl --no-check-certificate link | |
| # run in background | |
| youtube-dl --no-check-certificate -q link & |
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 processInboxToSheet() { | |
| //var threads = GmailApp.getInboxThreads(); | |
| // Have to get data separate to avoid google app script limit! | |
| var start = 0; | |
| var threads = GmailApp.search('in:unread', 0, 100); | |
| var sheet = SpreadsheetApp.getActiveSheet(); | |
| var result = []; | |
| for (var i = 0; i < threads.length; i++) { | |
| var thread = threads[i]; |
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 extractData(data, startStr, endStr) { | |
| // This function extracts text between two strings | |
| // i.e. extractData("Good_news,_everyone!", "Good_", ",_Everyone!") will return "News" | |
| var startIndex, endIndex, text = 'N/A'; | |
| startIndex = data.indexOf(startStr); | |
| if(startIndex != -1) { | |
| startIndex += startStr.length; | |
| text = data.substring(startIndex); |
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 processInboxToSheet() { | |
| //var threads = GmailApp.getInboxThreads(); | |
| // Have to get data separate to avoid google app script limit! | |
| var start = 0; | |
| var threads = GmailApp.getInboxThreads(start, 100); | |
| var sheet = SpreadsheetApp.getActiveSheet(); | |
| var result = []; | |
| for (var i = 0; i < threads.length; i++) { | |
| var messages = threads[i].getMessages(); |