diff sat_frontends/jp/cmd_blog.py @ 3097:2a7dfe43b161

jp (blog): added --language to common publish argument
author Goffi <goffi@goffi.org>
date Fri, 20 Dec 2019 14:23:42 +0100
parents d9f328374473
children 9d0df638c8b4
line wrap: on
line diff
--- a/sat_frontends/jp/cmd_blog.py	Fri Dec 20 12:28:04 2019 +0100
+++ b/sat_frontends/jp/cmd_blog.py	Fri Dec 20 14:23:42 2019 +0100
@@ -142,6 +142,11 @@
             action="append",
             help=_("tag (category) of your item"),
         )
+        self.parser.add_argument(
+            "-l",
+            "--language",
+            help=_("language of the item (ISO 639 code)"),
+        )
 
         comments_group = self.parser.add_mutually_exclusive_group()
         comments_group.add_argument(
@@ -182,6 +187,8 @@
             mb_data['tags'] = self.args.tag
         if self.args.title is not None:
             mb_data["title"] = self.args.title
+        if self.args.language is not None:
+            mb_data["language"] = self.args.language
 
 
 class Set(base.CommandBase, BlogPublishCommon):