comparison frontends/src/jp/cmd_pubsub.py @ 2276:5cd45a79775b

jp (common): added --last-item to take last item when no item id is found/given
author Goffi <goffi@goffi.org>
date Wed, 28 Jun 2017 01:20:44 +0200
parents 64e99bf0dfa2
children e2f96cd1887b
comparison
equal deleted inserted replaced
2275:64e99bf0dfa2 2276:5cd45a79775b
298 298
299 299
300 class Edit(base.CommandBase, common.BaseEdit): 300 class Edit(base.CommandBase, common.BaseEdit):
301 301
302 def __init__(self, host): 302 def __init__(self, host):
303 base.CommandBase.__init__(self, host, 'edit', use_verbose=True, use_pubsub_node_req=True, help=_(u'edit an existing or new pubsub item')) 303 base.CommandBase.__init__(self, host, 'edit', use_verbose=True, use_pubsub=True, help=_(u'edit an existing or new pubsub item'))
304 common.BaseEdit.__init__(self, self.host, PUBSUB_TMP_DIR) 304 common.BaseEdit.__init__(self, self.host, PUBSUB_TMP_DIR)
305 305
306 def add_parser_options(self): 306 def add_parser_options(self):
307 self.parser.add_argument("item", type=base.unicode_decoder, nargs='?', default=u'new', help=_(u"URL of the item to edit, or keyword")) 307 self.parser.add_argument("item", type=base.unicode_decoder, nargs='?', default=u'new', help=_(u"URL of the item to edit, or keyword"))
308 common.BaseEdit.add_parser_options(self) 308 common.BaseEdit.add_parser_options(self)