mirror of
https://forge.chapril.org/tykayn/orgmode-to-gemini-blog
synced 2025-06-20 09:04:42 +02:00
module utils, add article wololo
This commit is contained in:
parent
3b9061514f
commit
3bf5856bab
12 changed files with 307 additions and 85 deletions
24
utils/maker.py
Normal file
24
utils/maker.py
Normal file
|
@ -0,0 +1,24 @@
|
|||
# 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
|
Loading…
Add table
Add a link
Reference in a new issue