up templating

This commit is contained in:
Tykayn 2024-11-04 01:20:58 +01:00 committed by tykayn
parent c17b922673
commit d9b0606a74
10 changed files with 5274 additions and 3188 deletions

View File

@ -66,8 +66,11 @@ Pandoc, PandocGmi
# Roadmap # Roadmap
- TODOconfig par site web de son nom de domaine - config par site web de son nom de domaine
- TODO réécriture des liens internes - réécriture des liens internes
- navigation sur les pages d'article
- réécriture des url des images vers le dossier courant
- réparer la génération de fichiers gmi
- template footer article: gestion article suivant et précédent - template footer article: gestion article suivant et précédent
# Fait # Fait
-gestion des langues dans la source et la destination -gestion des langues dans la source et la destination

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,399 @@
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<title>yaya_blog</title>
<style type='text/css'>* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: Helvetica, "Ubuntu Sans", "Noto Sans", Arial, sans-serif;
text-align: left;
margin: 0 auto;
font-size: 1rem;
max-width: 600px;
}
h1, h2, h3, h4, h5, h6 {
font-family: "Open Sans", "Noto Sans", Times, serif;
}
/* 1. Use a more-intuitive box-sizing model */
*, *::before, *::after {
box-sizing: border-box;
}
/* 2. Remove default margin */
* {
margin: 0;
}
body {
/* 3. Add accessible line-height */
line-height: 1.5;
/* 4. Improve text rendering */
-webkit-font-smoothing: antialiased;
}
/* 5. Improve media defaults */
img, picture, video, canvas, svg {
display: block;
max-width: 100%;
}
/* 6. Inherit fonts for form controls */
input, button, textarea, select {
font: inherit;
}
/* 7. Avoid text overflows */
p, h1, h2, h3, h4, h5, h6 {
overflow-wrap: break-word;
}
/* 8. Improve line wrapping */
p {
text-wrap: pretty;
}
h1, h2, h3, h4, h5, h6 {
text-wrap: balance;
}
/*
9. Create a root stacking context
*/
#root, #__next {
isolation: isolate;
}
input, button, textarea, select {
font: inherit;
}
</style></head>
<body>
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<title>cil_gometz</title>
<style type='text/css'>* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: Helvetica, "Ubuntu Sans", "Noto Sans", Arial, sans-serif;
text-align: left;
margin: 0 auto;
font-size: 1rem;
max-width: 600px;
}
h1, h2, h3, h4, h5, h6 {
font-family: "Open Sans", "Noto Sans", Times, serif;
}
/* 1. Use a more-intuitive box-sizing model */
*, *::before, *::after {
box-sizing: border-box;
}
/* 2. Remove default margin */
* {
margin: 0;
}
body {
/* 3. Add accessible line-height */
line-height: 1.5;
/* 4. Improve text rendering */
-webkit-font-smoothing: antialiased;
}
/* 5. Improve media defaults */
img, picture, video, canvas, svg {
display: block;
max-width: 100%;
}
/* 6. Inherit fonts for form controls */
input, button, textarea, select {
font: inherit;
}
/* 7. Avoid text overflows */
p, h1, h2, h3, h4, h5, h6 {
overflow-wrap: break-word;
}
/* 8. Improve line wrapping */
p {
text-wrap: pretty;
}
h1, h2, h3, h4, h5, h6 {
text-wrap: balance;
}
/*
9. Create a root stacking context
*/
#root, #__next {
isolation: isolate;
}
input, button, textarea, select {
font: inherit;
}
</style></head>
<body>
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<title>qzine_blog</title>
<style type='text/css'>* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: Helvetica, "Ubuntu Sans", "Noto Sans", Arial, sans-serif;
text-align: left;
margin: 0 auto;
font-size: 1rem;
max-width: 600px;
}
h1, h2, h3, h4, h5, h6 {
font-family: "Open Sans", "Noto Sans", Times, serif;
}
/* 1. Use a more-intuitive box-sizing model */
*, *::before, *::after {
box-sizing: border-box;
}
/* 2. Remove default margin */
* {
margin: 0;
}
body {
/* 3. Add accessible line-height */
line-height: 1.5;
/* 4. Improve text rendering */
-webkit-font-smoothing: antialiased;
}
/* 5. Improve media defaults */
img, picture, video, canvas, svg {
display: block;
max-width: 100%;
}
/* 6. Inherit fonts for form controls */
input, button, textarea, select {
font: inherit;
}
/* 7. Avoid text overflows */
p, h1, h2, h3, h4, h5, h6 {
overflow-wrap: break-word;
}
/* 8. Improve line wrapping */
p {
text-wrap: pretty;
}
h1, h2, h3, h4, h5, h6 {
text-wrap: balance;
}
/*
9. Create a root stacking context
*/
#root, #__next {
isolation: isolate;
}
input, button, textarea, select {
font: inherit;
}
</style></head>
<body>
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<title>tykayn_blog</title>
<style type='text/css'>* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: Helvetica, "Ubuntu Sans", "Noto Sans", Arial, sans-serif;
text-align: left;
margin: 0 auto;
font-size: 1rem;
max-width: 600px;
}
h1, h2, h3, h4, h5, h6 {
font-family: "Open Sans", "Noto Sans", Times, serif;
}
/* 1. Use a more-intuitive box-sizing model */
*, *::before, *::after {
box-sizing: border-box;
}
/* 2. Remove default margin */
* {
margin: 0;
}
body {
/* 3. Add accessible line-height */
line-height: 1.5;
/* 4. Improve text rendering */
-webkit-font-smoothing: antialiased;
}
/* 5. Improve media defaults */
img, picture, video, canvas, svg {
display: block;
max-width: 100%;
}
/* 6. Inherit fonts for form controls */
input, button, textarea, select {
font: inherit;
}
/* 7. Avoid text overflows */
p, h1, h2, h3, h4, h5, h6 {
overflow-wrap: break-word;
}
/* 8. Improve line wrapping */
p {
text-wrap: pretty;
}
h1, h2, h3, h4, h5, h6 {
text-wrap: balance;
}
/*
9. Create a root stacking context
*/
#root, #__next {
isolation: isolate;
}
input, button, textarea, select {
font: inherit;
}
</style></head>
<body>
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<title>cipherbliss_blog</title>
<style type='text/css'>* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: Helvetica, "Ubuntu Sans", "Noto Sans", Arial, sans-serif;
text-align: left;
margin: 0 auto;
font-size: 1rem;
max-width: 600px;
}
h1, h2, h3, h4, h5, h6 {
font-family: "Open Sans", "Noto Sans", Times, serif;
}
/* 1. Use a more-intuitive box-sizing model */
*, *::before, *::after {
box-sizing: border-box;
}
/* 2. Remove default margin */
* {
margin: 0;
}
body {
/* 3. Add accessible line-height */
line-height: 1.5;
/* 4. Improve text rendering */
-webkit-font-smoothing: antialiased;
}
/* 5. Improve media defaults */
img, picture, video, canvas, svg {
display: block;
max-width: 100%;
}
/* 6. Inherit fonts for form controls */
input, button, textarea, select {
font: inherit;
}
/* 7. Avoid text overflows */
p, h1, h2, h3, h4, h5, h6 {
overflow-wrap: break-word;
}
/* 8. Improve line wrapping */
p {
text-wrap: pretty;
}
h1, h2, h3, h4, h5, h6 {
text-wrap: balance;
}
/*
9. Create a root stacking context
*/
#root, #__next {
isolation: isolate;
}
input, button, textarea, select {
font: inherit;
}
</style></head>
<body>
<html><head><title>Dragonfeu blog</title></head><body> # DragonFeu - Articles
-----------------------
<br><a href=/index.html>index.html</a><br><a href=/2024-11-02-coucou-gemini.html>2024-11-02-coucou-gemini.html</a><br><a href=/2024-09-08-strategie-mitigation-accident-fusion-coeur-epr2.html>2024-09-08-strategie-mitigation-accident-fusion-coeur-epr2.html</a><br><a href=/2024-05-15-l-aventure-superphenix.html>2024-05-15-l-aventure-superphenix.html</a><br><a href=/2023-06-10-recap-centrale-zaporijia.html>2023-06-10-recap-centrale-zaporijia.html</a><br><a href=/2023-06-09-recapitulatif-contenu-threads.html>2023-06-09-recapitulatif-contenu-threads.html</a><br><a href=/2024-11-02-coucou-gemini.html>2024-11-02-coucou-gemini.html</a></article></body></html>
</body>
</html>
</body>
</html>
</body>
</html>
</body>
</html>
</body>
</html>

View File

@ -0,0 +1,31 @@
import argparse
from website_config import configs_sites
def assemble_article_template(article_file, template_file, output_file):
# Ouvrir le fichier de template en mode lecture
with open(template_file, "r") as f:
template = f.read()
# Ouvrir le fichier d'article en mode lecture
with open(article_file, "r") as f:
article = f.read()
# Remplacer $$ARTICLE$$ dans le template par le contenu de l'article
html = template.replace("$$ARTICLE$$", article)
# Écrire le contenu HTML dans le fichier de sortie
with open(output_file, "w") as f:
f.write(html)
if __name__ == "__main__":
# Définir les arguments de la ligne de commande
parser = argparse.ArgumentParser(description="Assembler un article et un template pour créer un fichier HTML.")
parser.add_argument("article_file", help="Le fichier d'article à inclure dans le template.")
parser.add_argument("template_file", help="Le fichier de template à utiliser.")
parser.add_argument("output_file", help="Le fichier de sortie HTML.")
# Récupérer les arguments de la ligne de commande
args = parser.parse_args()
# Assembler l'article et le template
assemble_article_template(args.article_file, args.template_file, args.output_file)