2024-11-12 00:55:21 +01:00
|
|
|
#!/bin/python3
|
2024-11-15 23:55:20 +01:00
|
|
|
# import argparse
|
|
|
|
|
|
|
|
from utils import *
|
2024-11-12 00:55:21 +01:00
|
|
|
from website_config import configs_sites
|
|
|
|
|
2024-11-15 23:55:20 +01:00
|
|
|
# parser = argparse.ArgumentParser(description="Générer un site Web à partir de fichiers HTML.")
|
|
|
|
# parser.add_argument("blog_name", help="Le chemin vers le dossier contenant les fichiers HTML.")
|
2024-11-12 00:55:21 +01:00
|
|
|
# parser.add_argument("--title", "-t", default="Mon site Web", help="Le titre du site Web.")
|
|
|
|
# parser.add_argument("--style", default="templates/style_general.css", help="Le chemin vers le fichier de style CSS.")
|
2024-11-15 23:55:20 +01:00
|
|
|
# args = parser.parse_args()
|
|
|
|
|
|
|
|
# print(configs_sites[args.blog_name]['DESCRIPTION'])
|
|
|
|
# tester la génération de slug sur un fichier org donné
|
|
|
|
|
2024-11-19 13:49:39 +01:00
|
|
|
# basename_file = '20111126170159_cipherbliss_blog_120_bienvenue-sur-informageek.org'
|
|
|
|
# found_slug = find_slug_in_file_basename(basename_file)
|
|
|
|
# print('slug found:',found_slug)
|
|
|
|
#
|
|
|
|
# basename_file = '20200803124344_blog_cil_gometz_11_ecrire-une-comptine-en-python-bonjour-le-jour.org'
|
|
|
|
# found_slug = find_slug_in_file_basename(basename_file)
|
|
|
|
# print('slug found:',found_slug)
|
|
|
|
#
|
|
|
|
# basename_file = '20241115010205_cipherbliss_blog_suivi-de-rédaction-de-livre-orgmode.org'
|
|
|
|
# found_slug = find_slug_in_file_basename(basename_file)
|
|
|
|
# print('slug found:',found_slug)
|
|
|
|
#
|
|
|
|
# basename_file = '20061125015032_tkblog_864_pourquoi-mee2-est-il-une-flamme.org'
|
|
|
|
# found_slug = find_slug_in_file_basename(basename_file)
|
|
|
|
# print('slug found:',found_slug)
|
2024-11-15 23:55:20 +01:00
|
|
|
|
2024-11-19 13:49:39 +01:00
|
|
|
# trouver le bon slug avec l'année
|
2024-11-12 00:55:21 +01:00
|
|
|
|
2024-11-19 13:49:39 +01:00
|
|
|
# fichier = 'sources/tykayn_blog/lang_fr/20170708T095535_tkblog_918_7-techniques-geniales-pour-maximiser-son-malheur-au-quotidien.org'
|
|
|
|
fichier = '20170708T095535__techniques-geniales-pour-maximiser-son-malheur-au-quotidien.org'
|
|
|
|
datestr, slug, path = find_year_and_slug_on_filename(fichier)
|
|
|
|
print(datestr, slug, path)
|