-
Man muss sich die App Scriptable installieren. In-App-Purchases sind nicht notwendig, aber absolut verdient! Support Indie-Development!
-
Danach legt man in der App ein neues Script an in dem man oben rechts auf das Plus klickt.
-
Kopiere den Inhalt dieses Gist in den Editor in der App. Am leichtesten geht es, wenn man den Gist auf seinem Desktop Rechner öffnet und das ganze über das geteilte Clipboad nach iOS kopiert. Aber man kann das Ganze natürlich auch auf dem iOS Device komplett erledigen.
-
Danach oben links auf "Done" klicken und damit das Skript in Scriptable speichern. Mit einem Long-Press auf das Script kann man noch den Namen sinnvoll ändern, was sich durchaus empfiehlt, wenn man mehrere Skripte dort installiert hat.
-
Zum Test kann man das Skript direkt in Scrip
View init.lua
-- | |
-- Automatic Config Reloading | |
-- Based on Spoon: https://www.hammerspoon.org/Spoons/ReloadConfiguration.html | |
-- | |
hs.loadSpoon("ReloadConfiguration") | |
spoon.ReloadConfiguration:start() | |
-- | |
-- Caffeine Replacement | |
-- Based on Spoon: https://www.hammerspoon.org/Spoons/Caffeine.html |
View cd.fish
#!/bin/env fish | |
function cd -d "change directory, and activate virtualenvs, if available" | |
set venvdir "venv" | |
# first and foremost, change directory | |
builtin cd $argv | |
# find a parent git directory | |
if git rev-parse --show-toplevel >/dev/null ^/dev/null |
View install_incidence_and_newcases_widget.md
View incidens_and_newcases.js
// Variables used by Scriptable. | |
// These must be at the very top of the file. Do not edit. | |
// icon-color: brown; icon-glyph: magic; | |
// Variables used by Scriptable. | |
// These must be at the very top of the file. Do not edit. | |
// icon-color: brown; icon-glyph: magic; | |
// Licence: Robert Koch-Institut (RKI), dl-de/by-2-0 | |
class IncidenceNewCasesWidget { | |
constructor() { |
View newcases.js
// Licence: Robert Koch-Institut (RKI), dl-de/by-2-0 | |
const apiUrl = `https://services7.arcgis.com/mOBPykOjAyBO2ZKk/arcgis/rest/services/RKI_COVID19/FeatureServer/0/query?f=json&where=NeuerFall%20IN(1%2C%20-1)&returnGeometry=false&spatialRel=esriSpatialRelIntersects&outFields=*&outStatistics=%5B%7B%22statisticType%22%3A%22sum%22%2C%22onStatisticField%22%3A%22AnzahlFall%22%2C%22outStatisticFieldName%22%3A%22value%22%7D%5D&resultType=standard&cacheHint=true`; | |
let widget = await createWidget() | |
if (!config.runsInWidget) { | |
await widget.presentSmall() | |
} | |
Script.setWidget(widget) | |
Script.complete() |