diff options
-rwxr-xr-x | do-until | 12 | ||||
-rwxr-xr-x | fix-shebang | 3 | ||||
-rwxr-xr-x | humanify | 9 | ||||
-rwxr-xr-x | mksparse | 3 |
4 files changed, 12 insertions, 15 deletions
@@ -29,16 +29,16 @@ import time class DoUntil(cliapp.Application): def add_settings(self): - self.settings.add_boolean_setting(['no-act', 'n'], + self.settings.boolean(['no-act', 'n'], 'Do not run command, just pretend to do it, ' - 'and pretend that it succeeds.') - self.settings.add_boolean_setting(['verbose', 'v'], - 'Print command before executing it.') - self.settings.add_integer_setting(['sleep'], + 'and pretend that it succeeds.') + self.settings.boolean(['verbose', 'v'], + 'Print command before executing it.') + self.settings.integer(['sleep'], 'Wait SECS seconds before re-trying a command. ' '(Default is %default.)', default=1) - self.settings.add_integer_setting(['max-tries'], + self.settings.integer(['max-tries'], 'Try at most COUNT times, with 0 meaning forever. ' '(Default is %default.)', default=0) diff --git a/fix-shebang b/fix-shebang index ee1756d..8478cd2 100755 --- a/fix-shebang +++ b/fix-shebang @@ -23,8 +23,7 @@ import tempfile class FixShebang(cliapp.Application): def add_settings(self): - self.settings.add_string_setting(['shebang'], - 'interpreter path and args') + self.settings.string(['shebang'], 'interpreter path and args') def process_input(self, arg): name = self.create_tempfile_for(arg) @@ -45,11 +45,10 @@ class Humanify(cliapp.Application): ] def add_settings(self): - self.settings.add_boolean_setting(['binary', 'iec'], - 'use 10-based, not 2-based prefixes ' - '(ISO vs IEC)') - self.settings.add_boolean_setting(['bits'], - 'inputs give numbers of bits') + self.settings.boolean(['binary', 'iec'], + 'use 10-based, not 2-based prefixes ' + '(ISO vs IEC)') + self.settings.boolean(['bits'], 'inputs give numbers of bits') def process_args(self, args): self.units = self.determine_units() @@ -6,8 +6,7 @@ import cliapp class MakeSparseFile(cliapp.Application): def add_settings(self): - self.settings.add_bytesize_setting(['size'], - 'size of whole to append to file') + self.settings.bytesize(['size'], 'size of whole to append to file') def process_args(self, filenames): if self.settings['size'] > 0: |