orgmode-to-gemini-blog/testing.py

31 lines
1.3 KiB
Python
Raw Normal View History

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é
basename_file = '20111126170159_cipherbliss_blog_120_bienvenue-sur-informageek.org'
found_slug = detect_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 = detect_slug_in_file_basename(basename_file)
print('slug found:',found_slug)
2024-11-12 00:55:21 +01:00
2024-11-15 23:55:20 +01:00
basename_file = '20241115010205_cipherbliss_blog_suivi-de-rédaction-de-livre-orgmode.org'
found_slug = detect_slug_in_file_basename(basename_file)
print('slug found:',found_slug)
2024-11-12 00:55:21 +01:00
2024-11-15 23:55:20 +01:00
basename_file = '20061125015032_tkblog_864_pourquoi-mee2-est-il-une-flamme.org'
found_slug = detect_slug_in_file_basename(basename_file)
print('slug found:',found_slug)