# HG changeset patch # User Jérémy Bobbio # Date 1560785016 -7200 # Node ID 59c3e639f62c10c427f37b157c796f13bdb03b66 # Parent c799179d7ca65704740657115709c5beecf2ec0f [devtools] Allow to specify short desc on `newcube` command line In order to implement automated testing of `cubicweb-ctl newcube`, we need to avoid any user interaction. So we add a `-s` switch to specify a short description on the command-line instead of requiring an input. diff -r c799179d7ca6 -r 59c3e639f62c cubicweb/devtools/devctl.py --- a/cubicweb/devtools/devctl.py Tue Jul 02 14:54:01 2019 +0200 +++ b/cubicweb/devtools/devctl.py Mon Jun 17 17:23:36 2019 +0200 @@ -622,6 +622,11 @@ 'help': 'verbose mode: will ask all possible configuration questions', } ), + ("short-description", + {'short': 's', 'type': 'string', 'metavar': '', + 'help': 'short description for the cube', + } + ), ("author", {'short': 'a', 'type' : 'string', 'metavar': '', 'default': 'LOGILAB S.A. (Paris, FRANCE)', @@ -717,7 +722,7 @@ if osp.exists(cubedir): self.fail("%s already exists!" % cubedir) skeldir = osp.join(BASEDIR, 'skeleton') - longdesc = shortdesc = input( + longdesc = shortdesc = self['short-description'] or input( 'Enter a short description for your cube: ') if verbose: longdesc = input(