Mit dem iPhone scannen, um zu installieren
Vorschau
9GAG 🐳
Download 9GAG posts
Setup
- Create a photo album called 9 GAG
- Edit the popular and sections list
- Hit run 🥳
Neue Funktionen
Version 1.0
First release
Was er macht
121 Aktionen-
Dictionary
-
Set Variableconfig
-
Get Dictionary Value
-
Repeat with Each
-
Get Dictionary Value
-
Get Type
-
Get Type
-
If
-
Get Dictionary Value
-
Set Variablesub_config
-
Get Dictionary Value
-
Repeat with Each
-
Get Dictionary Value
-
Set Dictionary Value
-
Set Variablesub_config
-
Set Dictionary Value
-
Set Variableconfig
-
If
-
Set Dictionary Value
-
Set Variableconfig
-
Get Dictionary Value
-
Set Variablebacktrack
-
Get Dictionary Value
-
Set Variablealbum
-
Get Dictionary Value
-
Set Variablenotification
-
Get Dictionary Value
-
Set Variablepreview
-
Get Dictionary Value
-
Set Variablesave
-
Get Dictionary Value
-
If
-
Text
-
If
-
Text
-
Set Variablesection_name
-
Get Dictionary Value
-
Text
-
Set Variabledatabase.file
-
Get File
-
Get Dictionary from Input
-
Set Variabledatabase
-
Set Variablepreviews
-
List
-
Repeat with Each
-
Get Dictionary Value
-
Repeat with Each
-
Set Variablesection
-
Get Dictionary Value
-
If
-
Number
-
Set Variabledownloads
-
Set Variablenewest_post
-
Get Dictionary Value
-
Set Variablelast_post
-
If
-
Number
-
Set Variablelast_post
-
If
-
Text
-
Set Variablenext
-
Repeat
-
Get Contents of URLhttps://9gag.com/v1/group-posts/group/…/type/…?…
-
Set Variablejson
-
Get Dictionary Value
-
Repeat with Each
-
Set Variablepost
-
Get Dictionary Value
-
If
-
Get Dictionary Value
-
If
-
Set Variablenewest_post
-
If
-
If
-
Set Variablenewest_post
-
If
-
If
-
Get Dictionary Value
-
If
-
Get Dictionary Value
-
If
-
Get Dictionary Value
-
Set Variableurl
-
Get Contents of URL…
-
Add to Variable
-
If
-
Save to Photo Album
-
If
-
Calculate
-
Set Variabledownloads
-
If
-
If
-
Get Dictionary Value
-
Set Variablenext
-
Set Dictionary Value
-
Set Variabledatabase
-
If
-
If
-
Show Notification… neue Beiträge in …
-
If
-
If
-
If
-
Count
-
If
-
Get Dictionary Value
-
Set Variableairplane
-
If
-
Set Airplane Mode
-
If
-
If
-
Quick Look
-
If
-
If
-
Set Airplane Mode
-
If
-
If
-
If
-
Show NotificationKeine neuen Beiträge
-
If
-
Save File
-
Count
Als Code ansehen
Jede Aktion dieses Kurzbefehls als Cherri ausgeschrieben, eine Programmiersprache für Kurzbefehle. Ideal, um zu lernen, wie er funktioniert.
#include 'actions/web'
#define color green
#define glyph play
@config = {
"airplane": false,
"album": "9 GAG",
"backtrack": 2,
"database": "9gag",
"hot": true,
"notification": true,
"popular": {
"animals": false,
"anime-manga": false,
"animewaifu": false,
"awesome": false,
"car": false,
"comic-webtoon": false,
"cosplay": false,
"funny": false,
"gaming": false,
"gif": false,
"girl": false,
"girlcelebrity": false,
"leagoflegends": false,
"meme": false,
"nsfw": false,
"politics": false,
"relationship": false,
"savage": false,
"video": false,
"wtf": false
},
"preview": false,
"save": true,
"sections": {
"animewallpaper": false,
"apexlegends": false,
"ask9gag": false,
"basketball": false,
"countryballs": false,
"crappydesign": false,
"darkhumor": false,
"drawing-diy-crafts": false,
"food-drinks": false,
"football": false,
"fortnite": false,
"got": false,
"guy": false,
"history": false,
"home-living": false,
"horror": false,
"kpop": false,
"lego": false,
"movie-tv": false,
"music": false,
"overwatch": false,
"pcmr": false,
"pokemon": false,
"pubg": false,
"rate-my-outfit": false,
"satisfying": false,
"school": false,
"science-tech": false,
"sport": false,
"starwars": false,
"superhero": false,
"timely": false,
"travel-photography": false,
"wallpaper": false,
"warhammer": false,
"wholesome": false
}
}
const Wrterbuchwert = getValue(ShortcutInput, "")
for _ in Wrterbuchwert {
const Wrterbuchwert1 = getValue(ShortcutInput, @RepeatItem)
const Typ = typeOf(Wrterbuchwert1)
typeOf(@config)
if Typ == {
@sub_config = @config[@RepeatItem]
const Wrterbuchwert2 = getKeys(Wrterbuchwert1)
for _ in Wrterbuchwert2 {
setValue(@sub_config, @RepeatItem2)
@sub_config
}
setValue(@config, @RepeatItem, @sub_config)
@config
} else {
setValue(@config, @RepeatItem, Wrterbuchwert1)
@config
}
}
@backtrack = @config['backtrack']
@album = @config['album']
@notification = @config['notification']
@preview = @config['preview']
@save = @config['save']
const Wrterbuchwert3 = getValue(@config, "hot")
if Wrterbuchwert3 == {
} else {
}
@section_name = "fresh"
@databasefile = "{}.json"
const Datei = getFileFromFolder(, @databasefile, false)
getDictionary(Datei)
@database
@previews = nil
const Liste = list(@config['popular'], @config['sections'])
for _ in Liste {
const Wrterbuchwert4 = getValue(@RepeatItem, "")
for _ in Wrterbuchwert4 {
@section = @RepeatItem2
const Wrterbuchwert5 = getValue(@RepeatItem, @section)
if Wrterbuchwert5 == {
@downloads = 0
@newest_post = nil
@last_post = @database[@section]
if !@last_post {
@last_post = 0
} else {
}
@next = "nil"
repeat _ for @backtrack {
downloadURL("https://9gag.com/v1/group-posts/group/{@section}/type/{@section_name}?{@next}")
@json
const Wrterbuchwert6 = getValue(@json, "data.posts")
for _ in Wrterbuchwert6 {
@post = @RepeatItem4
const Wrterbuchwert7 = getValue(@post, "article")
if !Wrterbuchwert7 {
const Wrterbuchwert8 = getValue(@post, "creationTs")
if !@newest_post {
@newest_post = Wrterbuchwert8
} else {
if Wrterbuchwert8 > @newest_post {
@newest_post = Wrterbuchwert8
} else {
}
}
if Wrterbuchwert8 > @last_post {
const Wrterbuchwert9 = getValue(@post, "images.image460sv")
if Wrterbuchwert9 {
getValue(Wrterbuchwert9, "url")
} else {
getValue(@post, "images.image700.url")
}
@url
const InhaltDerURL = downloadURL(@url)
@previews = InhaltDerURL
if @save == {
savePhoto(InhaltDerURL, @album)
} else {
}
@downloads = @downloads + 1
} else {
}
} else {
}
}
@next = @json['data.nextCursor']
}
setValue(@database, @section, @newest_post)
@database
if @downloads > 0 {
if @notification == {
showNotification("{@downloads} neue Beiträge in {@section}", "9GAG 🐳", @database)
} else {
}
} else {
}
} else {
}
}
}
const Anzahl = count(@previews)
if Anzahl > 0 {
@airplane = @config['airplane']
if @airplane == {
setAirplaneMode(false)
} else {
}
if @preview == {
quicklook(@previews)
} else {
}
if @airplane == {
setAirplaneMode(0)
} else {
}
} else {
if @notification == {
showNotification("Keine neuen Beiträge", "9GAG 🐳", Anzahl)
} else {
}
}
saveFile(@databasefile, @database, true)
count(@previews)
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
Mehr von oliver
Das gefällt dir vielleicht auch
Werbung