The default YouTube applet for Tidbyt did not have the detail I wanted, nor did they open source it, so here is an alternate version. Starlark does not support external files, libraries, string formatting, or most basic functionality so I wrote my own comma insertion function. I’m guessing Starlark’s limitations are why the standard YouTube applet doesn’t give exact numbers for channel stats. https://github.com/brianrhall/Tidbyt-YouTube
For string formatting, have you tried Pixlet’s humanize module?
Docs: pixlet/modules.md at 2f606fe4181aff8d560036fb6049a6f13e17a518 · tidbyt/pixlet · GitHub
Example: pixlet/humanize.star at e56988c8a4f0500ae6c16e053d1046b01f0f62d3 · tidbyt/pixlet · GitHub
No matter what I try I get told…
starlark.ExecFile: cannot load humanize.star: invalid module: humanize.star
it’s the only module I’ve had such problems with so far.
Ah I was working on 0.16.0, which doesn’t support humanize. Pixlet 0.17.0 was just released this past week does include humanize. So, at the time I wrote the applet, humanize wasn’t released yet, but is another option now. I’ve updated my github page to show both methods. Some devs may prefer having a singular function as opposed to loading a module for one op and also something that works for any version of Pixlet. Good to know humanize is a thing now though…albeit a terrible name for a module.