Pr0gramm
Shows a user's pr0gramm benis
| System | AWTRIX NG Scripts |
|---|---|
| Firmware | AWTRIX NG |
| Topic | Social |
| Built by | Mvrcl549 |
| File | XHzCplUVXjUE.ax · 1.8 KB |
| Icons | — |
| Published | 17 Aug 2026 |
| Downloads | 2 |
Pr0gramm Display
This script displays the score ("Benis") of a Pr0gramm user.
Settings
- Username
- Icon (default=26807)
- Update interval (default=5min)
Icons
Before installing the script, use the AWTRIX NG web interface to install the following LaMetric icons:
26807– Pr0gramm logo
Installation
- Click the "Install on my Awtrix" button or copy and paste the script
- Change the username in the settings
XHzCplUVXjUE.ax
# @name Pr0gramm
# @desc Shows a user's pr0gramm score
# @author Mvrcl549
# @version 1.3
# @config name text "Username" default=""
# @config icon text "Icon ID" default="26807"
# @config every number "Update interval" default=5 min=1 max=60 unit=min
class Pr0grammScore
var url, period
var score, label
var ticks, in_flight
var ic
def init()
self.url = "https://pr0gramm.com/api/profile/info?name=" + store.get("name")
self.period = store.get("every") * 60
self.ic = store.get("icon")
self.score = store.get("score")
self.label = self.score == nil ? nil : str(self.score)
self.ticks = 0
self.in_flight = false
end
def on_body(body, status)
self.in_flight = false
if body == nil
log("pr0gramm: keine Antwort, status=" + str(status))
return
end
var m = re.search("\"score\":(-?[0-9]+)", body)
if m == nil
log("pr0gramm: score nicht gefunden, status=" + str(status))
return
end
var s = num(m[1])
if s == nil return end
self.score = s
self.label = str(s)
store.set("score", s)
end
def loop()
if self.ticks <= 0
self.ticks = self.period
if !self.in_flight
self.in_flight = true
http.get(self.url, / b, st -> self.on_body(b, st),
{'find': "\"score\":", 'keep': 40})
end
end
self.ticks -= 1
end
def draw()
clear()
if !icon(self.ic, 0, 0)
rect_fill(0, 0, 8, 8, 0x222222)
end
if self.label == nil
text(12, 6, "...", 0x666666)
return
end
var w = text_ink_width(self.label)
var x = 9 + (width() - 9 - w) / 2
text(x, 6, self.label)
end
def on_button(btn)
if btn == "select" self.ticks = 0 end
end
end
return Pr0grammScore()
Install it on your AWTRIX NG
Your browser writes the script straight to the device on your network. It joins the app rotation right away.
Some browsers refuse to talk to a device on your network from a public page. Download the flow and paste it into the Scripts tab of your device, or install it from a terminal:
More flows for AWTRIX NG Scripts or Social
Something wrong with this flow? Report it.