View pocket_favourites.py
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
!/usr/bin/python | |
import requests, json, datetime | |
access_token = "ENTER_YOUR_ACCESS_TOKEN" | |
consumer_key = "ENTER_YOUR_CONSUMER_KEY" | |
get_url = 'https://getpocket.com/v3/get' | |
#Find the Unix Epoch timestamp exactly 24 hours before now | |
since = int(datetime.datetime.now().strftime("%s")) - 86400 |
View Shorten Links
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(e) { | |
DocumentApp.getUi().createAddonMenu() | |
.addItem("Shorten Links", 'displayLinks') | |
.addToUi(); | |
} | |
function onInstall(e) { | |
onOpen(e); | |
} |