I'm not sure what you mean by "in a script form". In any case, the "authoritative" source of the template served by time.openstreetmap.org is this GitHub: https://github.com/gravitystorm/openstreetmap-carto
In script form=a script that generates a list of tiles with localised terrain names, given a list of tag combinations as on the page you mentioned earlier. I probably have to look better around their repos. Both links you have given so far have already proven useful elsewhere. Maybe I just have to render a map with a bunch of squares and make them into tiles. Thanks anyway!