Add description
This commit is contained in:
parent
559f5ee0b3
commit
f2e5574c45
3 changed files with 11 additions and 2 deletions
|
@ -30,6 +30,14 @@ def generate_READMEs(app_path: str):
|
||||||
|
|
||||||
template = env.get_template(f"README{lang_suffix}.md.j2")
|
template = env.get_template(f"README{lang_suffix}.md.j2")
|
||||||
|
|
||||||
|
if (app_path / "doc" / f"DESCRIPTION{lang_suffix}.md").exists():
|
||||||
|
description = (app_path / "doc" / f"DESCRIPTION{lang_suffix}.md").read_text()
|
||||||
|
# Fallback to english if maintainer too lazy to translate the description
|
||||||
|
elif (app_path / "doc" / "DESCRIPTION.md").exists():
|
||||||
|
description = (app_path / "doc" / "DESCRIPTION.md").read_text()
|
||||||
|
else:
|
||||||
|
description = None
|
||||||
|
|
||||||
if (app_path / "doc" / "screenshots").exists():
|
if (app_path / "doc" / "screenshots").exists():
|
||||||
screenshots = os.listdir(os.path.join(app_path, "doc", "screenshots"))
|
screenshots = os.listdir(os.path.join(app_path, "doc", "screenshots"))
|
||||||
if ".gitkeep" in screenshots:
|
if ".gitkeep" in screenshots:
|
||||||
|
@ -48,6 +56,7 @@ def generate_READMEs(app_path: str):
|
||||||
out = template.render(
|
out = template.render(
|
||||||
lang=lang,
|
lang=lang,
|
||||||
upstream=upstream,
|
upstream=upstream,
|
||||||
|
description=description,
|
||||||
screenshots=screenshots,
|
screenshots=screenshots,
|
||||||
disclaimer=disclaimer,
|
disclaimer=disclaimer,
|
||||||
manifest=manifest,
|
manifest=manifest,
|
||||||
|
|
|
@ -29,7 +29,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
{{manifest.description[lang]}}
|
{% if description %}{{description}}{% else %}{{manifest.description[lang]}}{% endif %}
|
||||||
|
|
||||||
**Shipped version:** {% if upstream.version %}{{upstream.version}}{% else %}{{manifest.version}}{% endif %}
|
**Shipped version:** {% if upstream.version %}{{upstream.version}}{% else %}{{manifest.version}}{% endif %}
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour
|
||||||
|
|
||||||
## Vue d'ensemble
|
## Vue d'ensemble
|
||||||
|
|
||||||
{{manifest.description[lang]}}
|
{% if description %}{{description}}{% else %}{{manifest.description[lang]}}{% endif %}
|
||||||
|
|
||||||
**Version incluse :** {% if upstream.version %}{{upstream.version}}{% else %}{{manifest.version}}{% endif %}
|
**Version incluse :** {% if upstream.version %}{{upstream.version}}{% else %}{{manifest.version}}{% endif %}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue