extract tmeplatess by using script's text/template type