mirror of
https://forge.chapril.org/tykayn/orgmode-to-gemini-blog
synced 2025-06-20 09:04:42 +02:00
28 lines
No EOL
751 B
Python
28 lines
No EOL
751 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""":PROPERTIES:
|
||
:ID: 2d3dea63-7567-4def-80d9-c9bd82d41eed
|
||
:END:
|
||
|
||
#+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 |