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
// Variables used by Scriptable. | |
// These must be at the very top of the file. Do not edit. | |
// icon-color: red; icon-glyph: newspaper; | |
// insert your Spotify client id and secret here (replace xxx) | |
const clientId = "xxx" | |
const clientSecret = "xxx" | |
let widget = new ListWidget() | |
widget.setPadding(22, 10, 10, 10) |
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
// this Scriptable Widget is coded by Slowlydev (aka r/Sl0wly-edits, r/Slowlydev) and adapted by @marco79 | |
const DEV_MODE = false //for developer only | |
const DEV_PREVIEW = "medium" //for developer only (this script is specialy made for a medium sized widget) | |
const API_KEY = "" // enter your openweathermap.com api key | |
const FORECAST_HOURS = "3" | |
const UNITS = "metric" //metric for celsius and imperial for Fahrenheit | |
const CALENDAR_URL = "calshow://" //Apple Calendar App, if your favorite app does have a URL scheme feel free to change it |
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 widget = new ListWidget() | |
widget.setPadding(14,10,10,10) | |
widget.url = "https://covidstandardtime.com" | |
await loadCovidTime() | |
Script.setWidget(widget) | |
Script.complete() | |
// show a preview of the widget when run in the app, useful for testing | |
if(config.runsInApp) { |
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
// your DB Bahn Developer API token | |
// https://developer.deutschebahn.com/store/apis/info?name=Flinkster_API_NG&version=v1&provider=DBOpenData | |
const bahnApiToken = "xxx" | |
// the longitude and latitude of your desired station | |
const latitude = "50.95209" | |
const longitude = "6.91907" | |
// optional: the area uid of your desired station (for 100% accurate results) | |
const areaUid = "" |
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
// insert your Spotify client id and secret here | |
const clientId = "xxx" | |
const clientSecret = "xxx" | |
// the Spotify country ISO code | |
const spotifyCountry = "DE" | |
let widget = await createWidget() | |
Script.setWidget(widget) | |
Script.complete() |
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 spotifyCredentials | |
let widget = await createWidget() | |
Script.setWidget(widget) | |
Script.complete() | |
async function createWidget() { | |
let widget = new ListWidget() | |
let spotifyIcon = await getImage("spotify-icon.png") | |
widget.backgroundColor = new Color("1e2040") |
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
// widget created by @marco79 (Twitter) user/marco79 (RoutineHub) u/marco79 (Reddit) | |
// insert your Spotify client id and secret here | |
const clientId = "xxxxxx" | |
const clientSecret = "xxxxxx" | |
const spotifyPlaylistName = "Retrowelle Playlist" | |
// insert your IFTTT key and webhook url | |
const iftttUrl = "https://maker.ifttt.com/trigger/add_track_to_spotify/with/key/" | |
const iftttKey = "xxxxxx" |
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
// Variables used by Scriptable. | |
// These must be at the very top of the file. Do not edit. | |
// icon-color: cyan; icon-glyph: magic; | |
// the node sonos http api base url (running on your Pi for example) | |
let sonosBaseUrl = "http://192.168.178.10:5005" | |
// optional for cover art: the ip address of one of your Sonos speakers | |
let sonosPlayerUrl = "http://192.168.178.38:1400" | |
let param = args.widgetParameter |
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 param = args.widgetParameter | |
let widget = new ListWidget() | |
widget.setPadding(0,0,0,0) | |
// the node sonos http api base url | |
let sonosBaseUrl = "http://192.168.178.10:5005" | |
widget.backgroundColor = new Color("#FFFFFF") | |
await loadImage("https://mytuner.global.ssl.fastly.net/media/tvos_radios/BFcU2vjUXh.png") | |
await playOnSonos() | |
Script.setWidget(widget) |
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 widget = new ListWidget() | |
widget.setPadding(0,0,0,0) | |
widget.url = "https://p-events-delivery.akamaized.net/1108byjxmnoakagswdphbwatymztxxew/m3u8/main.m3u8" | |
widget.backgroundColor = new Color("#FFFFFF") | |
await loadImage("https://cdn.vertexreport.com/wp-content/uploads/2020/09/Apple-Event-September.jpg") | |
Script.setWidget(widget) | |
Script.complete() |