refactor: README template

This commit is contained in:
barredterra 2023-12-18 19:39:42 +01:00
parent c522b938d7
commit 0ffa95c73e

View file

@ -156,13 +156,8 @@ def _create_app_boilerplate(dest, hooks, no_git=False):
f.write(frappe.as_unicode(precommit_template.format(**hooks)))
with open(os.path.join(dest, hooks.app_name, "README.md"), "w") as f:
f.write(
frappe.as_unicode(
"## {}\n\n{}\n\n#### License\n\n{}".format(
hooks.app_title, hooks.app_description, hooks.app_license
)
)
)
f.write(frappe.as_unicode(readme_template.format(**hooks)))
license_body = get_license_text(license_name=hooks.app_license)
with open(os.path.join(dest, hooks.app_name, "license.txt"), "w") as f:
f.write(frappe.as_unicode(license_body))
@ -775,3 +770,12 @@ ci:
skip: []
submodules: false
"""
readme_template = """### {app_title}
{app_description}
### License
{app_license}
"""