_ = XLATOR.gettext
ngettext = XLATOR.ngettext
-__version__ = '0.6.2'
+__version__ = '0.6.3'
# =============================================================================
self.module_name = None
self.module_info = None
self.var_dir = None
+ self.details = False
self._force_desc_msg = _(
"Write the cache file also, if the data was successful read from chache file.")
"Cache files for the forge information are read and written from the sub "
"directory {sd!r} below it.").format(vd=str(DEFAULT_VAR_DIR), sd='forge')
forge_group.add_argument(
- '-D', '--dir', '--var-dir', dest='var_dir', metavar=_('DIRECTORY'),
+ '--dir', '--var-dir', dest='var_dir', metavar=_('DIRECTORY'),
action=DirectoryOptionAction, must_exists=True, help=help_txt,
)
+ help_txt = _("Show more details of the forge module.")
+ forge_group.add_argument(
+ '-D', '--details', dest="details", action="store_true", help=help_txt)
+
forge_group.add_argument(
'module_name', metavar=_('PUPPET-MODULE'), nargs=1,
help=_("The name of the module, which data should be retrieved from Puppet forge."),
else:
var_dir = self.cfg.var_dir
+ self.details = getattr(self.args, 'details', False)
+
self.module_name = self.args.module_name[0]
LOG.debug(_("Creating a {} object ...").format('ForgeModuleInfo'))
LOG.debug(_("Module-Info:") + '\n' + pp(self.module_info.as_dict()))
self.empty_line()
- self.module_info.show()
+ self.module_info.show(detail=self.details)
print(_('Last checked for Puppet forge:') + ' ' + self.module_info.date_checked)
self.empty_line()