add scss converter

This commit is contained in:
Tykayn 2024-11-10 00:01:15 +01:00 committed by tykayn
parent 7b582215dd
commit 07cee6a65d
53 changed files with 4507 additions and 337 deletions

View file

@ -17,9 +17,30 @@ blog_name = args.blog_name
source_blog = f"sources/{blog_name}"
header_content_path = f"{source_blog}/templates/header_page.org"
footer_content_path = f"{source_blog}/templates/header_page.org"
static_page_path = f"{source_blog}/templates/html/static.html"
# variables du template de page
BANNIERE_ENTETE=''
BLOG_TITLE='Cipher Bliss'
BLOG_SUBTITLE='Code, nouvelles technologies et entrepreneurariat par B. Lemoine'
TITLE=''
AUTHOR=''
PAGE_TITLE=''
LOCALE=''
DESCRIPTION=''
EMAIL='contact@cipherbliss.com'
SITE_ICON='https://www.cipherbliss.com/wp-content/uploads/2016/12/rond.png'
SITE_ICON='image/png'
NAVIGATION='<nav><a href="/">Accueil</a><a href="https://portfolio.cipherbliss.com">Portfolio</a><a href="/feed">Flux RSS</a><a href="/contact">Contact</a><a href="/ressources-de-café-vie-privée">Ressources</a></nav>'
BANNIERE_ENTETE='https://www.cipherbliss.com/wp-content/uploads/2016/11/bg.jpg'
BANNIERE_ENTETE_ALT='bannière du site'
ARTICLE=''
FOOTER=''
def enrich_one_file(file, root_path):
print(' ----------- enrich html file:',os.path.join(root_path, file))
css_content = ""
@ -43,24 +64,32 @@ def enrich_one_file(file, root_path):
# Ajouter la déclaration de charset UTF-8, le doctype HTML et le titre du site Web
html_content = f"""<!DOCTYPE html>
<!-- généré avec orgmode-to-gemini-blog par Tykayn -->
<html lang=\"fr\">
<head>
<meta charset=\"UTF-8\">
<title>{args.title}</title>
<title>{BLOG_TITLE}</title>
{css_content}
<link rel=\"stylesheet\" href=\"/style.css\"></link>
</head>
<body>
<a href=\"/\">Retour à l'Accueil</a>
<hr/>
{html_content}
<footer>
<hr/>
<a href='/'>Retour à l'Accueil</a>
</footer>
<header>
<h1>{BLOG_TITLE}</h1>
<p>{BLOG_SUBTITLE}</p>
{NAVIGATION}
</header>
<hr/>
<main>
{html_content}
</main>
<hr/>
<footer>
{NAVIGATION}
</footer>
</body>
</html>"""
</html>
"""
html_path_enriched=os.path.join(root_path, file)
# Écrire le contenu modifié dans le fichier HTML