How can I dynamically process calendar event names?

I use the native BTT calendar widget a lot, but many of my events have absurdly long names (they're autogenerated, and I can't change them).

I'd like to be able to write a simple script that can take as input these events (calendar, event title, time start/end) and output a processed style (set background color, shorten event name systematically, etc.)

Is this possible with current functionality/can somebody point me to the code that handles the calendar event -> BTT style processing?

edit: didn't realize BTT wasn't open source :frowning: