'Build templates for user docs pages, if missing.'

def build_user_docs(self):

    with open(os.path.join(self.app_path, u'..', u'license.txt'), u'r') as license_file:
        self.app_context[u'license_text'] = markdown(license_file.read())
        html = frappe.render_template(u'templates/autodoc/license.html', context=self.app_context)
    with open(os.path.join(self.docs_path, u'license.html'), u'w') as license_file:
        license_file.write(html.encode(u'utf-8'))
    shutil.copy(os.path.join(frappe.get_app_path(u'frappe', u'templates', u'autodoc', u'contents.html')), os.path.join(self.docs_path, u'contents.html'))
    shutil.copy(os.path.join(frappe.get_app_path(u'frappe', u'templates', u'autodoc', u'contents.py')), os.path.join(self.docs_path, u'contents.py'))
    html = frappe.render_template(u'templates/autodoc/install.md', context=self.app_context)
    with open(os.path.join(self.docs_path, u'install.md'), u'w') as f:
        f.write(html)
    self.update_index_txt(self.docs_path)
