Scanne avec ton iPhone pour installer
Battery cycle
Nouveautés
Version 1.0
First release
Ce qu’il fait
13 actions-
If
-
Show Result
-
Stop This Shortcut
-
If
-
If
-
Show Result
-
Stop This Shortcut
-
Set Name
-
Get Text from Input
-
Match Text
-
Match Text
-
Get Device Details
-
Show Result
Afficher en tant que code
Chaque action de ce raccourci écrite en Cherri, un langage de programmation pour Raccourcis. Idéal pour comprendre son fonctionnement.
#include 'actions/text'
#define color green
#define glyph battery
if !ShortcutInput {
show("No \"log-aggregated\" file found. Go to Settings > Privacy > Analytics & Improvements > Analytics Data. ")
stop()
} else {
if ShortcutInput !contains "log-aggregated" {
show("No \"log-aggregated\" file found. Go to Settings > Privacy > Analytics & Improvements > Analytics Data. ")
stop()
}
}
const RenamedItem = setName(ShortcutInput, "{ShortcutInput['Name']}.txt")
getText(RenamedItem)
containsText(, "(?<=BatteryCycleCount<\/key>).*\n.*.\d+")
containsText(, "\d+")
getDeviceDetail("Device Model")
show("Your {} battery cycle count is: {} cycles.")
Ouvrir dans Cherri Playground
Décompilé avec cherri 2.3.0 (GPL-2.0). Quelques corrections peuvent être nécessaires avant la compilation.
Notes et avis
Écrire un avis–
sur 5
★★★★★
★★★★
★★★
★★
★
0 ratings
Aucun avis pour le moment. Sois le premier à partager ton avis !
Publicité
Plus de outlander-2007
Ça pourrait aussi te plaire
Publicité