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
// Variables used by Scriptable. | |
// These must be at the very top of the file. Do not edit. | |
// icon-color: red; icon-glyph: calendar-alt; | |
let data = await loadData() | |
let app = data.today[0] | |
let widget = null | |
if (config.runsInWidget) { | |
if (config.widgetFamily == "small") { | |
widget = await createSmallWidget(app) | |
} else { |
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
// Variables used by Scriptable. | |
// These must be at the very top of the file. Do not edit. | |
// icon-color: deep-purple; icon-glyph: apple-alt; | |
const TITLE = "One More Thing" | |
const DATE = "2020-11-10T17:00:00Z" | |
const IMG_URL = "https://i.ibb.co/f2SN2Wb/bg.png" | |
let widget = await createWidget() | |
if (config.runsInWidget) { | |
Script.setWidget(widget) |
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
// Variables used by Scriptable. | |
// These must be at the very top of the file. Do not edit. | |
// icon-color: purple; icon-glyph: paw; | |
let pandaURL = "https://c402277.ssl.cf1.rackcdn.com/photos/7749/images/story_full_width/HI_204718.jpg?1414503137" | |
let slothURL = "https://c402277.ssl.cf1.rackcdn.com/photos/6518/images/story_full_width/iStock_000011145477Large_mini_%281%29.jpg?1394632882" | |
let redPandaURL = "https://c402277.ssl.cf1.rackcdn.com/photos/8036/images/story_full_width/WEB_279173.jpg?1418412345" | |
let pandaImg = await getImage(pandaURL) | |
let slothImg = await getImage(slothURL) | |
let redPandaImg = await getImage(redPandaURL) |
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
// This script recreates Greg Joswiak's widget that counts down to the "Hi, Speed" Apple Event on October 13th, 2020. | |
// You can see Greg's widget in this tweet: | |
// https://twitter.com/gregjoz/status/1313519797879988225 | |
// | |
// You'll need this image for the background: | |
// https://i.imgur.com/t9Jr8kL.png | |
// | |
// I've stored the image at imgs/hispeed.png Scriptable's folder in iCloud Drive. | |
let widget = createWidget() |
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
// Variables used by Scriptable. | |
// These must be at the very top of the file. Do not edit. | |
// icon-color: orange; icon-glyph: exclamation-triangle; | |
// Checks if Slack is down by examining their status page. Works perfectly with Siri. | |
let url = "https://status.slack.com" | |
let r = new Request(url) | |
if (config.runsWithSiri) { | |
let isDown = await getIsDown(url) | |
if (isDown) { | |
Speech.speak("Yes") |
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
// Variables used by Scriptable. | |
// These must be at the very top of the file. Do not edit. | |
// icon-color: red; icon-glyph: newspaper; | |
let items = await loadItems() | |
if (config.runsInWidget) { | |
let widget = createWidget(items) | |
Script.setWidget(widget) | |
Script.complete() | |
} else { |
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
// Variables used by Scriptable. | |
// These must be at the very top of the file. Do not edit. | |
// icon-color: pink; icon-glyph: user; | |
// In order to use the script, you must create a Slack app and install it on your workspace. Go here to create your app: api.slack.com/apps | |
// There's two important configurations you must make to the app: | |
// 1. Add the users.profile:write scope to the app. This scope is necessary to set a Slack status. | |
// 2. Add the following redirect URL, so Slack will redirect to Scriptable after authorizing. | |
// https://open.scriptable.app | |
// Run the script to grant your newly created app authorization to access your Slack account. After you've done this, you can use the script in Shortcuts. |
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
// Variables used by Scriptable. | |
// These must be at the very top of the file. Do not edit. | |
// icon-color: blue; icon-glyph: snowflake; | |
let html = await loadHTML() | |
let stickyItems = getStickyItems(html) | |
let liftCounts = getLiftCounts(stickyItems[1]) | |
let slopeCounts = getSlopeCounts(stickyItems[2]) | |
let snowDepth = getSnowDepth(stickyItems[3]) | |
let windSpeed = getWindSpeed(stickyItems[4]) | |
let tableTexts = [ |
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
// In order to use the script, you must create a Slack bot with the user:read scope and generate an accesss token. | |
// The script will prompt you to copy the access token in. | |
// The token is stored securely in the keychain. | |
let containers = await ContactsContainer.all() | |
let contacts = await Contact.all(containers) | |
let slackUsers = await loadSlackUsers() | |
slackUsers = slackUsers.filter(u => { | |
return !u["is_bot"] | |
&& !u["deleted"] | |
&& !u["is_restricted"] |
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
let url = "https://xkcd.com/info.0.json" | |
let req = new Request(url) | |
let json = await req.loadJSON() | |
let imgURL = json["img"] | |
alt = json["alt"] | |
req = new Request(imgURL) | |
let img = await req.loadImage() | |
QuickLook.present(img) | |
if (config.runsWithSiri) { | |
Speech.speak(alt) |