def _interpolate_in_index_html(self): """Replace dynamic content in ``index.html``.""" path = os.path.join(self.out_dir, 'index.html') with open(path) as fp: content = fp.read() today = strftime('%d %B %Y') content = interpolate(content, last_update=today) with open(path, 'w+') as fp: fp.write(content)
def _call_fut(self, s, **bindings): from awstatic.utils import interpolate return interpolate(s, **bindings)