generated from extratone/latte
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathBatch Shortcuts Signer (macOS).jelly
34 lines (29 loc) · 1.44 KB
/
Batch Shortcuts Signer (macOS).jelly
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import Shortcuts
#Color: green, #Icon: lock
/*
Automate `shortcuts sign` to export shareable .shortcut files by folder.
This is a modification of Federico Viticci’s “Shortcut Injector:” https://www.icloud.com/shortcuts/fa780dd6de044d878c4c827009651a56
Read more here: https://club.macstories.net/posts/creating-modifying-and-signing-shortcuts-on-macos
My contact information:
Email: [email protected]
Contact card: bit.ly/whoisdavidblue
RoutineHub Profile: https://routinehub.co/user/blue
GitHub: https://github.com/extratone/i
Telegram: t.me/extratone
Twitter: twitter.com/NeoYokel
Reddit: reddit.com/u/asphaltapostle
Mastodon: mastodon.social/@DavidBlue
EVERYWHERE: bit.ly/dbrolodex
*/
file(file: $0) >> Selected Folder
getShortcuts() >> getShortcuts
repeatEach(My Shortcuts) {
//Unable to get shortcuts action maccatalyst.com.Christopher-Hannah.Text-Case.TextCaseIntent
setName(input: Repeat Item, name: "${Formatted Text}", dontIncludeExtension: false) >> setName
saveFile(input: Renamed Item, ask: false, overwrite: true) >> Unsigned Shortcut File
matchText(text: "${Unsigned Shortcut File.get(File Path)}", regex: "(.+)\/(.+\.shortcut)") >> matchText
getMatchGroup(matches: Matches) >> getMatchGroup
text(text: "shortcuts") >> text
runShellScript(script: "cd ${Unsigned Shortcut File.get(File Path)}
shortcuts sign -m anyone -i "${ActionOutput.get(File Path)}" -o "${Formatted Text}/${ActionOutput}.shortcut"") >> runShellScript
} >> RepeatResult