Ejemplo n.º 1
0
 def usage(self):
     """
     Format this command's usage string
     """
     tpl = Template("Usage: ${cmd_name} ${options}${cmd_args}")
     return tpl.safe_substitute(cmd_name=self.name,
                                options=self.options and "[options] " or "",
                                cmd_args=self.format_cmd_args())
Ejemplo n.º 2
0
 def usage(self):
     """
     Format this command's usage string
     """
     tpl = Template("Usage: ${cmd_name} ${options}${cmd_args}")
     return tpl.safe_substitute(cmd_name=self.name,
                                options=self.options and "[options] " or "",
                                cmd_args=self.format_cmd_args())
Ejemplo n.º 3
0
 def info(self):
     from holland.core.util.template import Template
     from textwrap import dedent, wrap
     tmpl = Template("""
     backup-plugin   = ${plugin}
     backup-started  = ${start-time}
     backup-finished = ${stop-time}
     estimated size  = ${estimated-size}
     on-disk size    = ${on-disk-size}
     """)
     str = tmpl.safe_substitute(self._formatted_config())
     str = "\t" + dedent(str).lstrip()
     str = "\n\t\t".join(str.splitlines())
     return str
Ejemplo n.º 4
0
 def info(self):
     from holland.core.util.template import Template
     from textwrap import dedent, wrap
     tmpl = Template("""
     backup-plugin   = ${plugin}
     backup-started  = ${start-time}
     backup-finished = ${stop-time}
     estimated size  = ${estimated-size}
     on-disk size    = ${on-disk-size}
     """)
     str = tmpl.safe_substitute(self._formatted_config())
     str = "\t" + dedent(str).lstrip()
     str = "\n\t\t".join(str.splitlines())
     return str