Simplecuts news!
What's New
Version 1.0
First release
What it does
23 actions-
Get File
-
If
-
Text
-
If
-
Text
-
Set Variablecache
-
Get Contents of URLsimplecuts.glitch.me/apps/simplenews/startnews.txt
-
If
-
If
-
Append to Text File
-
Choose from Menu…
-
Choose from MenuView cache
-
If
-
Show Alert
-
Show Web Page
-
Stop This Shortcut
-
If
-
Split Text
-
Choose from List
-
Show Result
-
Stop This Shortcut
-
Choose from MenuExit
-
Text
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/web'
#define color orange
#define glyph openBook
const File = getFileFromFolder(, "newscache.txt", false)
if File {
} else {
}
@cache = "Simplenews-error.NoCache"
const news = downloadURL("simplecuts.glitch.me/apps/simplenews/startnews.txt")
if @cache contains "NoCache" {
} else {
appendToFile("newscache.txt", "{news}₽»")
}
menu news {
item "View cache":
if @cache contains "NoCache" {
confirm("Requires Simplenews Cache Utility.")
showWebpage("https://www.icloud.com/shortcuts/98e96672352d46c0821d0c1dcd9c57d9")
stop()
} else {
const SplitText = splitText(File, "₽»")
const ChosenItem = chooseFromList(SplitText)
show(ChosenItem)
stop()
}
item "Exit":
}
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 turtle
You Might Also Like
Advertisement