Skip to content

New Share your ideas with the AWTRIX community. Keep your creations together in your account.

Sign in

Which AWTRIX do you have? Choose it once and the Hub shows what runs on it.

ScriptAWTRIX NG

Bilibili Followers

On an AWTRIX display
Bilibili Followers shown on an AWTRIX display
Bilibili Followers · by Golevka2001

On your display

Your Bilibili follower count on the panel.

Which AWTRIX do you have? See below where it runs, or choose your device.
Topic
Social
Includes
Script · 1 icon

Runs on

  • Runs on 32×8 (TC001 & DIY)
  • Runs on 52×16 (TC002)
  • Does not run on 32×8 with AWTRIX 3 (TC001 & DIY) Made for AWTRIX NG.

Choose your display in the next step.

Send to AWTRIX

Choose your AWTRIX

Bilibili FollowersAWTRIX NG script

Install this script on your AWTRIX NG. Its icons and sounds are installed with it.

Your AWTRIX’s local address, for example 192.168.178.39 or awtrix.local.

The name shown in your AWTRIX script list. Use letters, digits, hyphens or underscores.

Connection & device login

Connect your phone or computer to the same network as your AWTRIX. Allow local network access if your browser asks.

Use the device’s IP address, without a page path such as /#/apps.

If your AWTRIX requires a login, the username and password fields will appear when you connect.

Sign in to the Hub to install scripts. Attached files are installed separately.

Script description

Your Bilibili follower count on the panel.

Press the select button for an instant refresh.

Setup: paste your UID into settings — it's the number in your profile URL: space.bilibili.com/12345 → 12345.

Setting Value
UID Your Bilibili UID (the number in your profile URL)
(Optional) Avatar URL Fixed avatar image URL; set Worker URL to use it
(Optional) Worker URL Image-proxy worker endpoint; used when Avatar URL is set
(Optional) CF Access Client ID For a Cloudflare Access-protected worker
(Optional) CF Access Client Secret For a Cloudflare Access-protected worker
Icon ID LaMetric icon ID (default 71441); fallback when Avatar URL is empty
Refresh Refresh interval in minutes

Image Proxy Worker — awtrixng-image-proxy-worker

The scripts that show an avatar need two pieces: an image URL and something to shrink it to the panel's 8x8 grid. That's what this worker does.

It's a tiny Cloudflare Worker: give it any image URL, it fetches the image, box-averages it down to 8x8, blends transparent pixels onto the panel's black background, and returns {"data":"<base64>","size":8}. The Berry app wraps that in the data URL data:image/jpeg;base64,<data> and shows it with icon().

There are two ways to call it:

Method Body / headers
GET /?url=<image url> Plain convenience for the URL in the query string.
GET / with an X-Url header Preferred from Berry — avoids URL-encoding the target's own query string.

Deploy it once with bun run deploy (needs bun and a free Cloudflare account), then paste the resulting https://<name>.<account>.workers.dev URL into the Worker URL setting of whichever app is showing an avatar. bun run test runs the offline assertions; bun run dev serves it locally.

Deploy to Cloudflare

Cloudflare Access — if you front the worker with an Access policy, pass the service token credentials through the client_id / client_secret settings of the affected app; the Berry script sends them as CF-Access-Client-Id / CF-Access-Client-Secret, which Access validates at the edge.

Learn more at https://github.com/Golevka2001/awtrix-scripts.

More scripts in Social

Something wrong with this script? Report it.