I am looking for the best way to populate a HTML template (like a sport ranking) from a database.
Thinking out loud: what is the best way to update data in an HTML Template from a webservice?
Use Javascript in the template itself;
Push data to the Caspar CG and tell him to update the template with it;
First one is quite easy to do, but I think it is better to use the second approach, right? Then how can I do it?
Is there a way to say “Hey Caspar, change the field X in the template Y” keeping the template on air and triggerinng something like a transition while applying the chage.
First you will need JavaScript inside your template anyway. To make change data dynamically.
There is, it’s called UPDATE and you send the data with it. To make a transition on a update you need to write JavaScript code in your update handler. There are examples around here in the forum. Use the serach bar on the top right.
One possibility is to use node.js so that you can do database logic before sending your amcp commands off to casparcg server using something like https://github.com/SuperFlyTV/casparcg-connection. You could replace the database logic part with network calls if you wanted to go the webservice route.