up conf for several websites
This commit is contained in:
parent
dbaaa6520f
commit
9177d16940
1
.gitignore
vendored
1
.gitignore
vendored
@ -10,6 +10,7 @@ __pycache__
|
||||
output/pictures
|
||||
output/*.org
|
||||
html-websites/*
|
||||
gemini-capsules/*
|
||||
html-websites/**/*
|
||||
pictures_done
|
||||
pictures_inbox/*
|
||||
|
@ -40,7 +40,7 @@ def generer_index(dossier_source, fichier_index):
|
||||
# Chemin complet pour le fichier d'index
|
||||
chemin_fichier_index_gemini = os.path.join(dossier_parent, 'gemini-capsules', args.source, 'index.gmi')
|
||||
chemin_fichier_index_html = os.path.join(dossier_parent, 'html-websites', args.source, 'index.html')
|
||||
|
||||
contenu_index_html = ''
|
||||
print('\n index html: ', chemin_fichier_index_html)
|
||||
# Génère le contenu du fichier d'index
|
||||
contenu_index_gmi = f"{config_title}\n{'- ' * len(config_title)}\n\n"
|
||||
@ -78,6 +78,7 @@ def generer_index(dossier_source, fichier_index):
|
||||
# et le renommer en index.html ensuite pour ne pas modifier l'index du blog
|
||||
contenu_index_html += f"<br/><a href={article_relative_url}>{article_name}</a>"
|
||||
os.makedirs(os.path.dirname(new_folder_path_this_article), exist_ok=True)
|
||||
mylog(" -------- créer le dossier de l article ", new_folder_path_this_article)
|
||||
shutil.copy(chemin_fichier_this_article_html, new_folder_path_this_article + 'index.html')
|
||||
else:
|
||||
contenu_index_html += f"<br/><a href=/{lang_folder}/{link_html}>{link_html}</a>"
|
||||
|
@ -38,7 +38,6 @@ convert_sources() {
|
||||
|
||||
mkdir -p converted
|
||||
|
||||
pwd
|
||||
ls -l *.${source_file_extension} |wc -l
|
||||
|
||||
for i in *.${source_file_extension} ; do
|
||||
@ -63,7 +62,7 @@ convert_sources() {
|
||||
# Définition de la fonction generate_website
|
||||
generate_website() {
|
||||
echo "----------- convert_sources :Génération du site $1..."
|
||||
|
||||
cp $style_file html-websites/$website_name/style.css
|
||||
|
||||
|
||||
if [ ! -d "sources/$website_name" ]; then
|
||||
@ -105,18 +104,25 @@ generate_website() {
|
||||
|
||||
# traduction en
|
||||
cd lang_en
|
||||
pwd
|
||||
convert_sources ../
|
||||
# echo "----------- pages en anglais du site web $website_name converties"
|
||||
cd ..
|
||||
# cd ..
|
||||
|
||||
|
||||
|
||||
cd ..
|
||||
cd ..
|
||||
# cd ..
|
||||
# cd ..
|
||||
echo " ____________________________________ "
|
||||
echo " ____________________________________ "
|
||||
echo " ____________________________________ "
|
||||
pwd
|
||||
|
||||
echo " ____________________________________ "
|
||||
echo " ____________________________________ "
|
||||
echo " ____________________________________ "
|
||||
|
||||
|
||||
cp $style_file html-websites/$website_name/style.css
|
||||
|
||||
|
||||
}
|
||||
@ -174,6 +180,7 @@ convert_markdown_to_gmi() {
|
||||
|
||||
|
||||
echo "----------- génération des fichiers gemini faite."
|
||||
pwd
|
||||
|
||||
|
||||
|
||||
@ -188,6 +195,7 @@ bash sass_styles.sh
|
||||
|
||||
# Boucle à travers la liste des sites Web
|
||||
for website_name in "${blogs_folders[@]}"; do
|
||||
export website_name=$website_name
|
||||
|
||||
generate_website $website_name
|
||||
|
||||
@ -214,6 +222,7 @@ for website_name in "${blogs_folders[@]}"; do
|
||||
|
||||
# traiter les réductions d'images dans l'inbox
|
||||
python3 pictures_resize.py
|
||||
mkdir -p "html-websites/$website_name/feed"
|
||||
python3 atom_generate.py $website_name
|
||||
mv "index_$website_name.xml" "html-websites/$website_name/feed/index.xml"
|
||||
|
||||
|
@ -168,7 +168,8 @@ def ouvrir_fichier(chemin_fichier):
|
||||
contenu = fichier.read()
|
||||
return contenu
|
||||
else:
|
||||
raise FileNotFoundError(f"Le fichier {chemin_fichier} n'existe pas.")
|
||||
print(f"Le fichier {chemin_fichier} n'existe pas.")
|
||||
return ''
|
||||
|
||||
liste_fichiers_du_blog_convertis = os.walk(html_pages)
|
||||
mylog('fichiers à enrichir:', liste_fichiers_du_blog_convertis)
|
||||
|
@ -79,7 +79,7 @@ for filename in os.listdir(INPUT_DIR):
|
||||
os.rename(input_image_path, done_image_path)
|
||||
# Écrire la ligne pour le document .org
|
||||
|
||||
org_line = f"\n\n[[file:{url_folder_pics}/{YEAR}/{small_image_name}][{filename}]]\n"
|
||||
org_line = f"\n\n[[{url_folder_pics}/{YEAR}/{small_image_name}][{filename}]]\n"
|
||||
with open(os.path.join("output", f"images_{YEAR}.org"), "a") as org_file:
|
||||
org_file.write(org_line)
|
||||
|
||||
|
@ -1,181 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="generator" content="pandoc" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
|
||||
<title>cil_gometz</title>
|
||||
<style>
|
||||
html {
|
||||
color: #1a1a1a;
|
||||
background-color: #fdfdfd;
|
||||
}
|
||||
body {
|
||||
margin: 0 auto;
|
||||
max-width: 36em;
|
||||
padding-left: 50px;
|
||||
padding-right: 50px;
|
||||
padding-top: 50px;
|
||||
padding-bottom: 50px;
|
||||
hyphens: auto;
|
||||
overflow-wrap: break-word;
|
||||
text-rendering: optimizeLegibility;
|
||||
font-kerning: normal;
|
||||
}
|
||||
@media (max-width: 600px) {
|
||||
body {
|
||||
font-size: 0.9em;
|
||||
padding: 12px;
|
||||
}
|
||||
h1 {
|
||||
font-size: 1.8em;
|
||||
}
|
||||
}
|
||||
@media print {
|
||||
html {
|
||||
background-color: white;
|
||||
}
|
||||
body {
|
||||
background-color: transparent;
|
||||
color: black;
|
||||
font-size: 12pt;
|
||||
}
|
||||
p, h2, h3 {
|
||||
orphans: 3;
|
||||
widows: 3;
|
||||
}
|
||||
h2, h3, h4 {
|
||||
page-break-after: avoid;
|
||||
}
|
||||
}
|
||||
p {
|
||||
margin: 1em 0;
|
||||
}
|
||||
a {
|
||||
color: #1a1a1a;
|
||||
}
|
||||
a:visited {
|
||||
color: #1a1a1a;
|
||||
}
|
||||
img {
|
||||
max-width: 100%;
|
||||
}
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
margin-top: 1.4em;
|
||||
}
|
||||
h5, h6 {
|
||||
font-size: 1em;
|
||||
font-style: italic;
|
||||
}
|
||||
h6 {
|
||||
font-weight: normal;
|
||||
}
|
||||
ol, ul {
|
||||
padding-left: 1.7em;
|
||||
margin-top: 1em;
|
||||
}
|
||||
li > ol, li > ul {
|
||||
margin-top: 0;
|
||||
}
|
||||
blockquote {
|
||||
margin: 1em 0 1em 1.7em;
|
||||
padding-left: 1em;
|
||||
border-left: 2px solid #e6e6e6;
|
||||
color: #606060;
|
||||
}
|
||||
code {
|
||||
font-family: Menlo, Monaco, Consolas, 'Lucida Console', monospace;
|
||||
font-size: 85%;
|
||||
margin: 0;
|
||||
hyphens: manual;
|
||||
}
|
||||
pre {
|
||||
margin: 1em 0;
|
||||
overflow: auto;
|
||||
}
|
||||
pre code {
|
||||
padding: 0;
|
||||
overflow: visible;
|
||||
overflow-wrap: normal;
|
||||
}
|
||||
.sourceCode {
|
||||
background-color: transparent;
|
||||
overflow: visible;
|
||||
}
|
||||
hr {
|
||||
background-color: #1a1a1a;
|
||||
border: none;
|
||||
height: 1px;
|
||||
margin: 1em 0;
|
||||
}
|
||||
table {
|
||||
margin: 1em 0;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
overflow-x: auto;
|
||||
display: block;
|
||||
font-variant-numeric: lining-nums tabular-nums;
|
||||
}
|
||||
table caption {
|
||||
margin-bottom: 0.75em;
|
||||
}
|
||||
tbody {
|
||||
margin-top: 0.5em;
|
||||
border-top: 1px solid #1a1a1a;
|
||||
border-bottom: 1px solid #1a1a1a;
|
||||
}
|
||||
th {
|
||||
border-top: 1px solid #1a1a1a;
|
||||
padding: 0.25em 0.5em 0.25em 0.5em;
|
||||
}
|
||||
td {
|
||||
padding: 0.125em 0.5em 0.25em 0.5em;
|
||||
}
|
||||
header {
|
||||
margin-bottom: 4em;
|
||||
text-align: center;
|
||||
}
|
||||
#TOC li {
|
||||
list-style: none;
|
||||
}
|
||||
#TOC ul {
|
||||
padding-left: 1.3em;
|
||||
}
|
||||
#TOC > ul {
|
||||
padding-left: 0;
|
||||
}
|
||||
#TOC a:not(:hover) {
|
||||
text-decoration: none;
|
||||
}
|
||||
code{white-space: pre-wrap;}
|
||||
span.smallcaps{font-variant: small-caps;}
|
||||
div.columns{display: flex; gap: min(4vw, 1.5em);}
|
||||
div.column{flex: auto; overflow-x: auto;}
|
||||
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
|
||||
/* The extra [class] is a hack that increases specificity enough to
|
||||
override a similar rule in reveal.js */
|
||||
ul.task-list[class]{list-style: none;}
|
||||
ul.task-list li input[type="checkbox"] {
|
||||
font-size: inherit;
|
||||
width: 0.8em;
|
||||
margin: 0 0.8em 0.2em -1.6em;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.display.math{display: block; text-align: center; margin: 0.5rem auto;}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<header id="title-block-header">
|
||||
<h1 class="title">cil_gometz</h1>
|
||||
</header>
|
||||
<hr />
|
||||
<p>Les trucs d'un dragon qui roule plus vite à vélo tel un neutron
|
||||
rapide, mais avec un casque opour le vélotaf chez Hexana.</p>
|
||||
<hr />
|
||||
<p>À propos => a-propos.gmi</p>
|
||||
<p>Projets => projets.gmi</p>
|
||||
<p>Contact => contact.gmi</p>
|
||||
<p>BlogRoll => blogroll.gmi</p>
|
||||
<hr />
|
||||
</body>
|
||||
</html>
|
@ -73,4 +73,82 @@ configs_sites = {
|
||||
"BANNIERE_ENTETE": "https://tykayn.fr/wp-content/themes/toivo-lite/images/header.jpg",
|
||||
"BANNIERE_ENTETE_ALT": "Bannière du site",
|
||||
},
|
||||
"cil_gometz": {
|
||||
"DOSSIER_SOURCE": "tykayn_blog",
|
||||
"NDD_GEMINI": "gemini.cil-gometz.org",
|
||||
"BANNIERE_ENTETE": "",
|
||||
"BLOG_TITLE": "Cil gometz",
|
||||
"BLOG_SUBTITLE": "Cil gometz",
|
||||
"TITLE": "",
|
||||
"AUTHOR": "Cil gometz",
|
||||
"PAGE_TITLE": "Cil gometz",
|
||||
"LOCALE": "fr_FR", # la langue principale
|
||||
"DESCRIPTION": "Cil gometz",
|
||||
"NDD": "https://cil-gometz.org",
|
||||
"EMAIL": "contact@cipherbliss.com",
|
||||
"SITE_ICON": "https://mastodon.cipherbliss.com/system/accounts/avatars/000/000/001/original/6388tykayn.gif",
|
||||
"SITE_ICON_TYPE": "image/png",
|
||||
"NAVIGATION": """
|
||||
<nav>
|
||||
<a href="/">Accueil</a>
|
||||
<a href="/feed">Flux RSS</a>
|
||||
<a href="/tags">Tags</a>
|
||||
<a href="/contact">Contact</a>
|
||||
</nav>
|
||||
""",
|
||||
"BANNIERE_ENTETE": "https://tykayn.fr/wp-content/themes/toivo-lite/images/header.jpg",
|
||||
"BANNIERE_ENTETE_ALT": "Bannière du site",
|
||||
},
|
||||
"qzine_blog": {
|
||||
"DOSSIER_SOURCE": "qzine_blog",
|
||||
"NDD_GEMINI": "source.qzine.fr",
|
||||
"BANNIERE_ENTETE": "",
|
||||
"BLOG_TITLE": "!Qzine",
|
||||
"BLOG_SUBTITLE": "La culture avec un grand !Q",
|
||||
"TITLE": "",
|
||||
"AUTHOR": "Tykayn",
|
||||
"PAGE_TITLE": "Qzine",
|
||||
"LOCALE": "fr_FR", # la langue principale
|
||||
"DESCRIPTION": "Illustrations, articles de sociologie et récits autour des vies sexuelles contemporaines",
|
||||
"NDD": "https://qzine.fr",
|
||||
"EMAIL": "contact@qzine.fr",
|
||||
"SITE_ICON": "https://mastodon.cipherbliss.com/system/accounts/avatars/000/000/001/original/6388tykayn.gif",
|
||||
"SITE_ICON_TYPE": "image/png",
|
||||
"NAVIGATION": """
|
||||
<nav>
|
||||
<a href="/">Accueil</a>
|
||||
<a href="https://cloud.tykayn.fr/index.php/s/dessins_partage_blog">Sources des illustrations</a>
|
||||
<a href="/tags">Tags</a>
|
||||
<a href="/contact">Contact</a>
|
||||
</nav>
|
||||
""",
|
||||
"BANNIERE_ENTETE": "https://tykayn.fr/wp-content/themes/toivo-lite/images/header.jpg",
|
||||
"BANNIERE_ENTETE_ALT": "Bannière du site",
|
||||
},
|
||||
"helia_blog": {
|
||||
"DOSSIER_SOURCE": "helia_blog",
|
||||
"NDD_GEMINI": "source.helia.tykayn.fr",
|
||||
"BANNIERE_ENTETE": "",
|
||||
"BLOG_TITLE": "Hélia Blog",
|
||||
"BLOG_SUBTITLE": "Yaya blog, les prémices parentales, puis sa vie et son oeuvre.",
|
||||
"TITLE": "",
|
||||
"AUTHOR": "Tykayn & Claire",
|
||||
"PAGE_TITLE": "Hélia Blog",
|
||||
"LOCALE": "fr_FR", # la langue principale
|
||||
"DESCRIPTION": "Textes et photos",
|
||||
"NDD": "https://helia.tykayn.fr",
|
||||
"EMAIL": "contact@cipherbliss.com",
|
||||
"SITE_ICON": "https://mastodon.cipherbliss.com/system/accounts/avatars/000/000/001/original/6388tykayn.gif",
|
||||
"SITE_ICON_TYPE": "image/png",
|
||||
"NAVIGATION": """
|
||||
<nav>
|
||||
<a href="/">Accueil</a>
|
||||
<a href="/feed">Flux RSS</a>
|
||||
<a href="/tags">Tags</a>
|
||||
<a href="/contact">Contact</a>
|
||||
</nav>
|
||||
""",
|
||||
"BANNIERE_ENTETE": "https://tykayn.fr/wp-content/themes/toivo-lite/images/header.jpg",
|
||||
"BANNIERE_ENTETE_ALT": "Bannière du site",
|
||||
},
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user