cli (blog): add --no-id-suffix flag, to prevent adding random suffix to user-friendly IDs

This commit is contained in:
Goffi 2023-12-05 13:12:01 +01:00
commit 2aecd646f0

View file

@ -184,6 +184,12 @@ class BlogPublishCommon:
help=_("disable comments (will remove comments node if it exist)"),
)
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",
@ -276,6 +282,8 @@ class BlogPublishCommon:
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: