From 4921b15074ea7b2f7c9fa7caf20c89ac01edec84 Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Fri, 6 May 2022 23:52:16 +0200 Subject: [PATCH] =?UTF-8?q?ajout=20fonctionnalit=C3=A9=20de=20titre=20cust?= =?UTF-8?q?om?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 5 +++++ genlog.sh | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c0aa454..c8c5e1c 100644 --- a/README.md +++ b/README.md @@ -30,3 +30,8 @@ put your files in the "content" folder or ``` ./genlog.sh /path/to/your/choosen/folder ``` + +or + +you can optionally add a text at the end of the HTML page title +```./genlog.sh /path/to/your/choosen/folder "Your custom title"``` diff --git a/genlog.sh b/genlog.sh index 7f8c80a..0b09ba9 100755 --- a/genlog.sh +++ b/genlog.sh @@ -25,7 +25,7 @@ find "$source_path" -wholename "*.gmi" -type f | while read -r gmi_file do # récupérer la 1ère ligne du fichier .gmi et remplacer "# " par "" - title="$(sed -n '1{s/# //p}' "$gmi_file")" + title="$(sed -n '1{s/# //p}' "$gmi_file") $2" # dans le header.html, remplacer "<\-- TITLE -->" par le titre récupéré # puis enregistrer le fichier ainsi modifié dans "temp/header.html"