mirror of
https://forge.chapril.org/tykayn/orgmode-to-gemini-blog
synced 2025-06-20 09:04:42 +02:00
add org files, copy style
This commit is contained in:
parent
01e90048c1
commit
0b9f66167c
2947 changed files with 157595 additions and 22033 deletions
|
@ -14,6 +14,7 @@ style_file = args.style
|
|||
css_content = ""
|
||||
with open(os.path.join(style_file), "r") as f:
|
||||
css_content = f.read()
|
||||
css_content = "<style type='text/css'>{css_content}</style>"
|
||||
|
||||
html_dir = args.html_dir
|
||||
|
||||
|
@ -26,7 +27,7 @@ for root, _, files in os.walk(html_dir):
|
|||
html_content = f.read()
|
||||
|
||||
# Ajouter la déclaration de charset UTF-8, le doctype HTML et le titre du site Web
|
||||
html_content = f"<!DOCTYPE html>\n<html lang=\"fr\">\n<head>\n<meta charset=\"UTF-8\">\n<title>{args.title}</title>\n<style type='text/css'>{css_content}</style></head>\n<body>\n<a href='/'>Retour à l'Accueil</a><hr/>{html_content}\n<footer><hr/><a href='/'>Retour à l'Accueil</a></footer></body>\n</html>"
|
||||
html_content = f"<!DOCTYPE html>\n<html lang=\"fr\">\n<style type='text/css' src='/style.css'></style><head>\n<meta charset=\"UTF-8\">\n<title>{args.title}</title>\n{css_content}</head>\n<body>\n<a href='/'>Retour à l'Accueil</a><hr/>{html_content}\n<footer><hr/><a href='/'>Retour à l'Accueil</a></footer></body>\n</html>"
|
||||
|
||||
# Écrire le contenu modifié dans le fichier HTML
|
||||
with open(os.path.join(root, file), "w") as f:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue