Add program options.
160714
def add_options(self):
        
        super(ThemeSwitcher, self).add_options()

        self.add_bool_option("-l", "--list",
            help="list available themes")
        self.add_bool_option("-c", "--current",
            help="print path to currently selected theme")
        self.add_bool_option("-n", "--next",
            help="rotate through selected themes, and print new path")
        self.add_bool_option("-a", "--all",
            help="remove any selections, and use all themes")
        self.add_value_option("-t", "--toggle", "NAME",
            help="toggle selection of a theme")
880317
def add_input_list_opt(self, opt, inputs):
        
        self.add_opt(opt)
        for inp in inputs:
            self.add_opt(inp)
            self._add_input(inp)
586319
function addOptions() {
		if ( is_array( $this->options ) )
			extract( $this->options, EXTR_SKIP );

		global $themecolors;

		if ( empty($bg) )
			$bg = isset( $themecolors['bg'] ) ? $themecolors['bg'] : 'transparent';
		if ( empty($fg) )
			$fg = isset( $themecolors['text'] ) ? $themecolors['text'] : '000000';

		if ( empty( $method ) )
			$method = 'Automattic_Latex_WPCOM';

		if ( empty( $css ) )
			$css = 'img.latex { vertical-align: middle; border: none; background: none; }';

		if ( empty( $wrapper ) )
			$wrapper = false;

		$this->options = compact( 'bg', 'fg', 'method', 'css', 'wrapper' );
		update_option( 'pb_latex', $this->options );
	}
224969
def addApplication(self, name, version=None, path=None, disk_num=0, soft=-1):
        """"""

        fapp = Features()
        fapp.features.append(Feature("name", "=", name))
        if version:
            fapp.features.append(Feature("version", "=", version))
        if path:
            fapp.features.append(Feature("path", "=", path))
        self.features.append(Feature("disk.%d.applications" % disk_num, "contains", fapp, soft > 0))
747984
def add_general_options!(opt)
        opt.separator 'General Options:'

        opt.on('-h', '--help', 'Show this help message and quit.') { |v| options[:help] = v }
        opt.on('-p', '--pretend', 'Run but do not make any changes.') { |v| options[:pretend] = v }
        opt.on('-f', '--force', 'Overwrite files that already exist.') { options[:collision] = :force }
        opt.on('-s', '--skip', 'Skip files that already exist.') { options[:collision] = :skip }
        opt.on('-q', '--quiet', 'Suppress normal output.') { |v| options[:quiet] = v }
        opt.on('-t', '--backtrace', 'Debugging: show backtrace on errors.') { |v| options[:backtrace] = v }
        opt.on('-c', '--svn', 'Modify files with subversion. (Note: svn must be in path)') do
          options[:svn] = `svn status`.inject({}) do |opt, e|
            opt[e.chomp[7..-1]] = true
            opt
          end
        end
        opt.on('-g', '--git', 'Modify files with git. (Note: git must be in path)') do
          options[:git] = `git status`.inject({:new => {}, :modified => {}}) do |opt, e|
            opt[:new][e.chomp[14..-1]] = true if e =~ /new file:/
            opt[:modified][e.chomp[14..-1]] = true if e =~ /modified:/
            opt
          end
        end
      end
1089512
def added(self, context):
        """"""
        context.ansi = ANSIFormatter(self._enable)
        context.aprint = context.ansi.aprint
1017032
def init_app(self, app):
        """"""
        app.cli.add_command(upgrader_cmd)
        app.extensions['invenio-upgrader'] = self
1012616
def install(replace_existing=False):
    """"""
    bunch = AutoBunch()
    bunch.name = 'DAPA'
    bunch.protocol = 'dapa'
    bunch.force = 'true'
    # bunch.delay=200

    install_programmer('dapa', bunch, replace_existing=replace_existing)
995057
def add_options(self):
        
        super(RtorrentMove, self).add_options()

        # basic options
        self.add_bool_option("-n", "--dry-run",
            help="don't move data, just tell what would happen")
        self.add_bool_option("-F", "--force-incomplete",
            help="force a move of incomplete data")
1124220
def add(addon, dev, interactive):
    
    application = get_current_application()
    application.add(
        addon,
        dev=dev,
        interactive=interactive
    )
809511
def add_options(self):
        
        # These options need to be conflict-free to the containing
        # script, i.e. avoid short options if possible.
        self.script.add_bool_option("-i", "--interactive",
            help="interactive mode (prompt before changing things)")
        self.script.add_bool_option("--yes",
            help="positively answer all prompts (e.g. --delete --yes)")
145694
def add_input_opt(self, opt, inp):
        
        self.add_opt(opt, inp._dax_repr())
        self._add_input(inp)
1195480
void addOption(SaneOption option) {
    Preconditions.checkState(option.getGroup() == this);
    options.add(option);
  }
1282731
def add(entry_point, all_entry_points, auto_write, scripts_path):
    ''''''

    click.echo()
    if not entry_point and not all_entry_points:
        raise click.UsageError(
            'Missing required option: --entry_point or --all_entry_points'
        )
    if not os.path.exists('setup.py'):
        raise click.UsageError('No setup.py found.')

    setup_data = parse_setup('setup.py')
    console_scripts = get_console_scripts(setup_data)

    scripts = []
    if all_entry_points and console_scripts:

        # Make sure our entry points start with py
        for entry in console_scripts:
            if not entry.startswith('py'):
                click.echo('Your python entry_points must start with py.')
                click.echo('Found: ' + entry)
                raise click.Abort()

        for entry in console_scripts:
            click.echo('Found entry_point: ' + entry)
            py_entry_point = entry
            entry_point = entry[2:]
            more_scripts = copy_templates(
                entry_point,
                py_entry_point,
                auto_write,
                scripts_path
            )

            for script in more_scripts:
                click.echo('    Created ' + script)

            scripts.extend(more_scripts)

    elif entry_point:
        if not entry_point.startswith('py'):
            click.echo('Your python entry_points must start with py.')
            raise click.Abort()
        if entry_point not in console_scripts:
            click.echo(entry_point + ' not found in your setups entry_points')
            click.echo('You will need to add it afterward if you continue...')
            click.echo('')
            click.confirm('Do you want to continue?', abort=True)

        click.echo('\nCreating scripts for: ' + entry_point)
        py_entry_point = entry_point
        entry_point = entry_point[2:]
        more_scripts = copy_templates(
            entry_point,
            py_entry_point,
            auto_write,
            scripts_path
        )

        for script in more_scripts:
            click.echo('    Created ' + script)

        scripts.extend(more_scripts)

    click.echo('\n\nAdd the following section to your package setup:\n')
    click.echo('scripts=[')
    for script in scripts:
        click.echo("    '{}',".format(script))
    click.echo('],')
806385
def _set_program_defaults(cls, programs):
        """"""
        for program in programs:
            val = getattr(cls, program.__name__) \
                and extern.does_external_program_run(program.__name__,
                                                     Settings.verbose)
            setattr(cls, program.__name__, val)
732156
def add_options(cls, parser):
        
        parser.add_option('--show-pydocstyle', action='store_true', help='show explanation of each PEP 257 error')
        parser.config_options.append('show-pydocstyle')
287644
def setup_options(opts):
    ''''''
    if opts.quiet:
        logger.log.setLevel(logging.WARNING)
        logger.GLOBAL_LOG_LEVEL = logging.WARNING

    if opts.verbose:
        logger.log.setLevel(logging.DEBUG)
        logger.GLOBAL_LOG_LEVEL = logging.DEBUG