ajout commentaires sur les usages possibles
This commit is contained in:
parent
4921b15074
commit
f162f321d1
1 changed files with 23 additions and 0 deletions
23
genlog.py
Normal file
23
genlog.py
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
import subprocess
|
||||||
|
import os
|
||||||
|
|
||||||
|
entree = os.open("./index.gmi", os.O_RDONLY)
|
||||||
|
sortie = os.open("./temp.html", os.O_WRONLY)
|
||||||
|
|
||||||
|
subprocess.run(
|
||||||
|
"gmnitohtml",
|
||||||
|
stdin=entree,
|
||||||
|
stdout=sortie,
|
||||||
|
stderr=None,
|
||||||
|
shell=True,
|
||||||
|
timeout=None,
|
||||||
|
)
|
||||||
|
|
||||||
|
header = os.open("./html/header.html", os.O_RDONLY)
|
||||||
|
body = os.open("./temp.html", os.O_RDONLY)
|
||||||
|
footer = os.open("./html/footer.html", os.O_RDONLY)
|
||||||
|
fichier = os.open("./out.html", os.O_APPEND)
|
||||||
|
|
||||||
|
fichier = header + body + footer
|
||||||
|
for line in header:
|
||||||
|
print(line)
|
||||||
Loading…
Add table
Add a link
Reference in a new issue