Skip to content

Instantly share code, notes, and snippets.

@PtruckStar
PtruckStar / widget-html-css-scriptable-jobs.js
Created January 17, 2022 05:20 — forked from dcatanzaro/widget-html-css-scriptable-jobs.js
Widget con HTML y CSS en Scriptable
//Twitter: https://twitter.com/DamianCatanzaro
const html = "<html> \
<head> \
<style> \
body { \
margin: 0; \
background-color: cyan; \
width: 500px; \
height: 500px; \
@PtruckStar
PtruckStar / Simple Weather Widget.js
Last active January 9, 2021 01:15
modern ui scriptable app weather widget
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: deep-gray; icon-glyph: cloud;
// made by @morinagapltynm
// credit to @ImGamez for weatherline
// credit to @mzeryck for SFSymbol code
const API_KEY = Keychain.get("WEATHER_ORG_API_KEY");
const lockLocation = true;
const locale = "id";
const nowstring = "now";
@PtruckStar
PtruckStar / Untitled Script 5.js
Created December 22, 2020 04:47
fetch sunrise sunset in scriptable app
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: orange; icon-glyph: magic;
// made by @morinagapltynm
async function getSunData() {
let sunData = {}
for(s = 0; s < 2; s++){
let date = today
if(s>0)date.setDate(date.getDate()+1);
let req = new Request("https://api.sunrise-sunset.org/json?lat="+LAT+"&lng="+LON+"&formatted=0&date="+date.getFullYear()+"-"+(date.getMonth()+1)+"-"+date.getDate()).loadJSON()
// These three lines demonstrate how this code works.
let img = await Photos.fromLibrary()
let newImg = await processImage(img)
QuickLook.present(newImg)
// This function takes an image and returns a processed image.
async function processImage(image) {
const imageId = "imageId"
const canvasId = "canvasId"
@PtruckStar
PtruckStar / Sticky note v3.3.js
Last active April 6, 2024 15:20
sticky notes widget with scriptable
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: deep-green; icon-glyph: sticky-note;
/*
#################################
####simple sticky note widget####
#################################
please read below for usage!!
you must configure font size and
@PtruckStar
PtruckStar / Corona virus updates.js
Created October 3, 2020 12:15
corona virus updates with scriptable
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: light-gray; icon-glyph: magic;
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: deep-green; icon-glyph: user-md;
// change "country" to a value from https://coronavirus-19-api.herokuapp.com/countries/
const country = "Indonesia"
const url = `https://coronavirus-19-api.herokuapp.com/countries/${country}`
const req = new Request(url)