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: image; | |
// download harrypotter font from fontspace.com/phoenix-phonts and install it using fontcase app | |
/* | |
* Change the widget values and test out the widget in this section. | |
* =================================================================== | |
*/ |
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: teal; icon-glyph: magic; | |
// To use, add a parameter to the widget with a format of: image.png|padding-top|text-color|ture for online server image or false to load local image|Image filers eg: nature,blur | |
// The image should be placed in the iCloud Scriptable folder (case-sensitive). | |
// The padding-top spacing parameter moves the text down by a set amount. | |
// The text color parameter should be a hex value. | |
// For example, to use the image bkg_fall.PNG with a padding of 40 and a text color of red, | |
// the parameter should be typed as: bkg_fall.png|40|#ff0000|true|nature |
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: yellow; icon-glyph: cloud; | |
// Widget Params | |
// Don't edit this, those are default values for debugging (location for Cupertino). | |
// You need to give your locations parameters through the widget params, more info below. | |
const widgetParams = JSON.parse((args.widgetParameter != null) ? args.widgetParameter : '{ "LAT" : "46.062" , "LON" : "13.242" , "LOC_NAME" : "Udine" }') | |
// WEATHER API PARAMETERS !important |
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: calendar-alt; | |
// CREDITS | |
// Greetings code Autumn Vibes by u/ben5292001 | |
// Battery code by u/_Bisho_ | |
// Weather stack code by u/coderjones | |
// Countdown code and assemble by u/flasozzi |
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
// Inspired/Forked from https://gist.github.com/mattapperson/114e5267d5bc736fbe616b6205f3df92 (Scriptable DailyText widget.js) | |
let dailyText = await loadText() | |
let widget = await createWidget(dailyText) | |
if (config.runsInWidget) { | |
await widget.presentSmall() | |
} else { | |
// await widget.presentSmall() | |
// opens the Scripture URL in Safari when tapped on the widget | |
let url = "https://www.biblegateway.com/passage/?search=" |
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
const lang = "en" //use the language of your choice "en", "de", "it", "fr", etc. | |
const url = `https://${lang}.wikipedia.org/api/rest_v1/page/random/summary` | |
const req = new Request(url) | |
const res = await req.loadJSON() | |
const i = new Request(res.thumbnail.source); | |
const img = await i.loadImage(); | |
let widget = createWidget(res.title, img, res.content_urls.mobile.page) | |
if (config.runsInWidget) { | |
// create and show 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
const getURL = year => `https://nolaborables.com.ar/api/v2/feriados/${year}` | |
const months = ['Enero','Febrero','Marzo','Abril','Mayo','Junio','Julio','Agosto','Septiembre','Octubre','Noviembre','Diciembre']; | |
const days = ['Domingo', 'Lunes', 'Martes', 'Miercoles', 'Jueves', 'Viernes', 'Sabado']; | |
const dayOfWeek = (day, month, year) => days[new Date(year, month, day).getDay()]; | |
const getYear = () => (new Date()).getFullYear(); | |
const getNextHoliday = function(holidays){ | |
const now = new Date() |