mirror of
https://forge.chapril.org/tykayn/orgmode-to-gemini-blog
synced 2025-06-20 09:04:42 +02:00
move files
This commit is contained in:
parent
a58b0efcad
commit
2a1891dc2a
399 changed files with 41852 additions and 36 deletions
|
@ -3,6 +3,7 @@
|
|||
# exemple de commande
|
||||
# python new_article.py cipherbliss_blog fr "Création d'un blog gemini"
|
||||
import argparse
|
||||
import os
|
||||
from datetime import datetime
|
||||
|
||||
# Configuration des arguments de la ligne de commande
|
||||
|
@ -20,7 +21,9 @@ date_string = now.strftime("%Y%m%d%H%M%S")
|
|||
date_string_full = now.strftime("%Y-%m-%d %H:%M:%S")
|
||||
# date_string_full = now.strftime("%Y%m%d%H%M%S")
|
||||
slug = args.title.lower().replace(" ", "-")
|
||||
filename = f"sources/{args.blog_dir}/lang_{args.lang}/{date_string}_{args.blog_dir}_{slug}.org"
|
||||
file_abs_path = os.path.abspath(os.path.dirname(__file__))
|
||||
|
||||
filename = f"{file_abs_path}/sources/{args.blog_dir}/lang_{args.lang}/{date_string}_{args.blog_dir}_{slug}.org"
|
||||
|
||||
import uuid
|
||||
|
||||
|
@ -39,4 +42,4 @@ with open(filename, "w") as f:
|
|||
f.write(f"* {args.title}\n\n")
|
||||
# f.write(f"[{date_string}]\n\n")
|
||||
|
||||
print(f"Le fichier '{filename}' a été créé avec succès.")
|
||||
print(f"Le fichier '{filename}' a été créé avec succès.")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue