mirror of
https://forge.chapril.org/tykayn/orgmode-to-gemini-blog
synced 2025-06-20 09:04:42 +02:00
24 lines
No EOL
551 B
Python
24 lines
No EOL
551 B
Python
# génère le contenu d'un nouvel article avec les propriétés spécifiées en config.
|
||
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']}
|
||
:END:
|
||
|
||
** {config['title']}
|
||
|
||
"""
|
||
return template |