This commit is contained in:
Tykayn 2025-02-28 18:43:17 +01:00 committed by tykayn
parent 3bf5856bab
commit dbbae888f4
15 changed files with 172 additions and 149 deletions

View file

@ -3,22 +3,26 @@ def make_article(config):
"""
Génère le contenu d'un nouvel article org-mode
"""
template = f"""#+TITLE: {config['title']}
#+DATE: {config['date_string_full']}
#+AUTHOR:
#+EMAIL:
#+LANGUAGE: {config['lang'] if 'lang' in config else 'fr'}
#+OPTIONS: toc:nil num:nil
#+STARTUP: showall
#+PERMALINK: {config['schema_slug']}
#+ID: {config['uuid']}
* Article
:PROPERTIES:
:ID: {config['uuid']}
template = f""":PROPERTIES:
:ID: 2d3dea63-7567-4def-80d9-c9bd82d41eed
:END:
** {config['title']}
#+title: {config['title']}
#+post_ID:
#+post_slug: {config['slug']}
#+post_lang: {config['lang'] if 'lang' in config else 'fr'}
#+post_url: {config['NDD']}{config['schema_slug']}
#+post_title: {config['title']}
#+post_tags:
#+post_series:
#+post_type: post
#+post_status: publish
#+post_date_published: <{config['date_string_full']}>
#+post_date_modified: <{config['date_string_full']}>
#+post_index_page_roam_id: {config['uuid']}
* {config['title']}
"""
return template