Neue Funktionen
Version 1.0
First release
Was er macht
5 Aktionen-
Repeat with Each
-
If
-
Run Shell Script
-
If
-
Show NotificationICNS can only be created from a PNG image
Als Code ansehen
Jede Aktion dieses Kurzbefehls als Cherri ausgeschrieben, eine Programmiersprache für Kurzbefehle. Ideal, um zu lernen, wie er funktioniert.
#define mac true
#include 'actions/mac'
#define color orange
#define glyph waterDrop
for _ in ShortcutInput {
if @RepeatItem == "png" {
runShellScript("name=${1%.*}\nmkdir \"$name\".iconset\nsips -z 16 16 $1 --out \"$name\".iconset/icon_16x16.png\nsips -z 32 32 $1 --out \"$name\".iconset/[email protected]\nsips -z 32 32 $1 --out \"$name\".iconset/icon_32x32.png\nsips -z 64 64 $1 --out \"$name\".iconset/[email protected]\nsips -z 128 128 $1 --out \"$name\".iconset/icon_128x128.png\nsips -z 256 256 $1 --out \"$name\".iconset/[email protected]\nsips -z 256 256 $1 --out \"$name\".iconset/icon_256x256x.png\nsips -z 512 512 $1 --out \"$name\".iconset/[email protected]\nsips -z 512 512 $1 --out \"$name\".iconset/icon_512x512.png\ncp $1 \"$name\".iconset/[email protected]\niconutil -c icns \"$name\".iconset\nrm -R \"$name\".iconset", @RepeatItem, "as arguments")
} else {
showNotification("ICNS can only be created from a PNG image", "Invalid File Format")
}
}
In Cherri Playground öffnen
Mit cherri 2.3.0 (GPL-2.0) dekompiliert. Eventuell sind kleine Korrekturen nötig, bevor es kompiliert wird.
Bewertungen und Rezensionen
Rezension schreiben–
von 5
★★★★★
★★★★
★★★
★★
★
0 ratings
No reviews yet. Be the first to share what you think!
Werbung
Das gefällt dir vielleicht auch
Werbung