TCK (Template Constructor Kit) is a small, free, BSD-licensed Python library and CLI-script to split an HTML file into building blocks for string based template engines to construct complex web GUIs using a DOM-like approach.


TCK can be used to split an HTML design file into multiple html files (or JSON entries) to be consumed by a (string-based) template engine. This way, you can show the design file to your customers and upgrade the design whenever you want without having to change the code that interacts with the design. For instance, imagine the following HTML design file:

  <!-- cut:block -->
   <div class="block">
    <!-- cut:diamond -->
    <!-- /cut:diamond -->
  <!-- /cut:block -->
tck design.html
generating: ./diamond.html
generating: ./block.html
generating: ./layout.html

Each file will contain one snippet of HTML specified by the region markers in the design file. For instance block.html will contain:

<div class="block" >
 <!-- paste:diamond -->

Special tck-attributes are processed like this:

<input data-tck="&checked" >


<img #&src# >
<input #&checked# >


Download: tck on git