You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
56 lines
1.5 KiB
56 lines
1.5 KiB
#! /usr/bin/env python3
|
|
# -*- coding: utf-8 -*-
|
|
|
|
"""
|
|
This documentation is licensed under Creative Commons-BY-SA-4.0.
|
|
Please read the provided documentation/LICENSE file or visit
|
|
https://creativecommons.org/licenses/by-sa/4.0/legalcode
|
|
|
|
The documentation is built statically and does not belong to the normal build process with configure and make
|
|
Its updating is part of the development process, not packaging and running.
|
|
The correct out/ dir is already part of git.
|
|
|
|
.adoc is asciidoctor, not simple asciidoc.
|
|
"""
|
|
|
|
|
|
#Make the readme
|
|
|
|
import sys
|
|
sys.path.append("../../engine")
|
|
from config import METADATA
|
|
from subprocess import run
|
|
from os import getcwd
|
|
import os.path
|
|
assert os.path.exists(os.path.join(getcwd(), __file__)), (getcwd(), __file__)
|
|
|
|
|
|
#Readme
|
|
|
|
with open("readme.template", "r") as r:
|
|
template_lektor = r.read()
|
|
|
|
template_lektor = """
|
|
_model: software
|
|
---
|
|
title: <name>
|
|
---
|
|
year: <year>
|
|
---
|
|
version: <version>
|
|
---
|
|
logo: <shortname>.png
|
|
---
|
|
body: <description>
|
|
"""
|
|
|
|
|
|
template_lektor = template_lektor.replace("<name>", METADATA["name"])
|
|
template_lektor = template_lektor.replace("<version>", METADATA["version"])
|
|
template_lektor = template_lektor.replace("<shortname>", METADATA["shortName"])
|
|
template_lektor = template_lektor.replace("<description>", METADATA["description"])
|
|
template_lektor = template_lektor.replace("<dependencies>", METADATA["dependencies"])
|
|
template_lektor = template_lektor.replace("<author>", METADATA["author"])
|
|
template_lektor = template_lektor.replace("<year>", METADATA["year"])
|
|
|
|
print (template_lektor)
|
|
|