Created
September 29, 2019 19:03
-
-
Save simonbs/81408a4f2211aa3c3e1f358255791293 to your computer and use it in GitHub Desktop.
Scriptable script that shows today's XKCD in Siri.
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
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) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment