changeset 4173:7df6ba11bdae

cli (blog): add `--no-id-suffix` flag, to prevent adding random suffix to user-friendly IDs
author Goffi <goffi@goffi.org>
date Tue, 05 Dec 2023 13:12:01 +0100
parents 0e48181d50ab
children 6929dabf3a7e
files libervia/cli/cmd_blog.py
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libervia/cli/cmd_blog.py	Tue Dec 05 13:10:21 2023 +0100
+++ b/libervia/cli/cmd_blog.py	Tue Dec 05 13:12:01 2023 +0100
@@ -185,6 +185,12 @@
         )
 
         self.parser.add_argument(
+            "--no-id-suffix",
+            action="store_true",
+            help=_("do no add random suffix to friendly ID")
+        )
+
+        self.parser.add_argument(
             "-S",
             "--syntax",
             help=_("syntax to use (default: get profile's default syntax)"),
@@ -276,6 +282,8 @@
             mb_data["title"] = self.args.title
         if self.args.language is not None:
             mb_data["language"] = self.args.language
+        if self.args.no_id_suffix:
+            mb_data["user_friendly_id_suffix"] = False
         if self.args.encrypt:
             mb_data["encrypted"] = True
         if self.args.sign: