Scan with your iPhone to install
Preview
Usage: - Converts between Morse code and texts without internet. - You can copy the result to your clipboard.
What's New
Version 1.1
Link fixed.
What it does
41 actions-
CommentAuthor: Ari R. Abdulla Usage: - Converts between Morse code and texts without internet. - You can copy the result to your clipboard.
-
Choose from MenuWhich converter do you want?
-
Choose from MenuText to Morse Code
-
Text
-
Get Dictionary from Input
-
Set Variabledict
-
Ask for InputEnter your text?
-
Get Text from Input
-
Change Case
-
Split Text
-
Set VariableIn
-
Repeat with Each
-
If
-
Get Dictionary Value
-
Combine Text
-
Set VariableResult
-
Choose from MenuYour Morse Code: …
-
Choose from MenuCopy
-
Copy to Clipboard
-
Choose from MenuExit
-
Stop This Shortcut
-
Choose from MenuMorse Code to Text
-
Text
-
Get Dictionary from Input
-
Set Variabledictt
-
Ask for InputEnter your morse code?
-
Get Text from Input
-
Split Text
-
Set VariableInn
-
Repeat with Each
-
If
-
Get Dictionary Value
-
Combine Text
-
Change Case
-
Set VariableFinal
-
Set VariableResultt
-
Choose from MenuYour Text: …
-
Choose from MenuCopy
-
Copy to Clipboard
-
Choose from MenuExit
-
Stop This Shortcut
View as code
Every action of this Shortcut written out as Cherri, a programming language for Shortcuts. Great for learning how it works.
#include 'actions/text'
#define color yellow
/*
Author: Ari R. Abdulla
Usage:
- Converts between Morse code and texts without internet.
- You can copy the result to your clipboard.
*/
menu "Which converter do you want?" {
item "Text to Morse Code":
const Text = "{\n \\"0\\": \\"-----\\",\n \\"1\\": \\".----\\",\n \\"2\\": \\"..---\\",\n \\"3\\": \\"...--\\",\n \\"4\\": \\"....-\\",\n \\"5\\": \\".....\\",\n \\"6\\": \\"-....\\",\n \\"7\\": \\"--...\\",\n \\"8\\": \\"---..\\",\n \\"9\\": \\"----.\\",\n \\"a\\": \\".-\\",\n \\"b\\": \\"-...\\",\n \\"c\\": \\"-.-.\\",\n \\"d\\": \\"-..\\",\n \\"e\\": \\".\\",\n \\"f\\": \\"..-.\\",\n \\"g\\": \\"--.\\",\n \\"h\\": \\"....\\",\n \\"i\\": \\"..\\",\n \\"j\\": \\".---\\",\n \\"k\\": \\"-.-\\",\n \\"l\\": \\".-..\\",\n \\"m\\": \\"--\\",\n \\"n\\": \\"-.\\",\n \\"o\\": \\"---\\",\n \\"p\\": \\".--.\\",\n \\"q\\": \\"--.-\\",\n \\"r\\": \\".-.\\",\n \\"s\\": \\"...\\",\n \\"t\\": \\"-\\",\n \\"u\\": \\"..-\\",\n \\"v\\": \\"...-\\",\n \\"w\\": \\".--\\",\n \\"x\\": \\"-..-\\",\n \\"y\\": \\"-.--\\",\n \\"z\\": \\"--..\\",\n \\".\\": \\".-.-.-\\",\n \\",\\": \\"--..--\\",\n \\"?\\": \\"..--..\\",\n \\"!\\": \\"-.-.--\\",\n \\"-\\": \\"-....-\\",\n \\"/\\": \\"-..-.\\",\n \\"@\\": \\".--.-.\\",\n \\"(\\": \\"-.--.\\",\n \\")\\": \\"-.--.-\\",\n \\" \\": \\"/\\"\n}"
getDictionary(Text)
@dict
const ProvidedInput = prompt("Enter your text?")
const Text1 = getText(ProvidedInput)
const UpdatedText = uppercase(Text1)
splitText(UpdatedText, "")
@In
for _ in @In {
if @RepeatItem == "" {
}
}
joinText(RepeatResults, " ")
@Result
menu "Your Morse Code: {@Result} " {
item "Copy":
setClipboard(@Result)
item "Exit":
stop()
}
item "Morse Code to Text":
const Text2 = "{\n \\"-----\\": \\"0\\",\n \\".----\\": \\"1\\",\n \\"..---\\": \\"2\\",\n \\"...--\\": \\"3\\",\n \\"....-\\": \\"4\\",\n \\".....\\": \\"5\\",\n \\"-....\\": \\"6\\",\n \\"--...\\": \\"7\\",\n \\"---..\\": \\"8\\",\n \\"----.\\": \\"9\\",\n \\".-\\": \\"a\\",\n \\"-...\\": \\"b\\",\n \\"-.-.\\": \\"c\\",\n \\"-..\\": \\"d\\",\n \\".\\": \\"e\\",\n \\"..-.\\": \\"f\\",\n \\"--.\\": \\"g\\",\n \\"....\\": \\"h\\",\n \\"..\\": \\"i\\",\n \\".---\\": \\"j\\",\n \\"-.-\\": \\"k\\",\n \\".-..\\": \\"l\\",\n \\"--\\": \\"m\\",\n \\"-.\\": \\"n\\",\n \\"---\\": \\"o\\",\n \\".--.\\": \\"p\\",\n \\"--.-\\": \\"q\\",\n \\".-.\\": \\"r\\",\n \\"...\\": \\"s\\",\n \\"-\\": \\"t\\",\n \\"..-\\": \\"u\\",\n \\"...-\\": \\"v\\",\n \\".--\\": \\"w\\",\n \\"-..-\\": \\"x\\",\n \\"-.--\\": \\"y\\",\n \\"--..\\": \\"z\\",\n \\".-.-.-\\": \\".\\",\n \\"--..--\\": \\",\\",\n \\"..--..\\": \\"?\\",\n \\"-.-.--\\": \\"!\\",\n \\"-....-\\": \\"-\\",\n \\"-..-.\\": \\"/\\",\n \\".--.-.\\": \\"@\\",\n \\"-.--.\\": \\"(\\",\n \\"-.--.-\\": \\")\\",\n \\" \\": \\"\\",\n \\"/\\": \\" \\"\n}"
getDictionary(Text2)
@dictt
const ProvidedInput1 = prompt("Enter your morse code?")
const Text3 = getText(ProvidedInput1)
splitText(Text3, " ")
@Inn
for _ in @Inn {
if @RepeatItem == {
}
}
const CombinedText = joinText(RepeatResults1, "Custom")
uppercase(CombinedText)
@Final
@Resultt = @Final
menu "Your Text: {@Resultt}" {
item "Copy":
setClipboard(@Resultt)
item "Exit":
stop()
}
}
Open in Cherri Playground
Decompiled with cherri 2.3.0 (GPL-2.0). May need small fixes before it compiles.
Ratings & Reviews
Write a Review–
out of 5
★★★★★
★★★★
★★★
★★
★
0 ratings
No reviews yet. Be the first to share what you think!
Advertisement
More by arirafiq
You Might Also Like
Advertisement