orgmode-to-gemini-blog/utils/maker.py
2025-02-28 16:37:59 +01:00

24 lines
No EOL
551 B
Python
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 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