How to use the cligj.files_inout_arg function in cligj

To help you get started, we’ve selected a few cligj examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mapbox / cligj / tests / test_cli.py View on Github external
    @cligj.files_inout_arg
    def cmd(files):
        for f in files:
            click.echo(f)
github opendatacube / datacube-stats / datacube_stats / utils / stack.py View on Github external
@files_inout_arg
@options.output_opt
@format_opt
@options.force_overwrite_opt
@options.creation_options
def stack(files, output, driver, force_overwrite,
          creation_options):
    """Stack all bands from one or more input files into a multiband dataset.

    Input datasets must be of a kind: same data type, dimensions, etc. The
    output is cloned from the first input.

    stacker will take all bands from each input and write them
    in same order to the output.

    Examples, using the Rasterio testing dataset, which produce a copy.
github mapbox / rasterio / rasterio / rio / features.py View on Github external
@cligj.files_inout_arg
@options.output_opt
@click.option('-j', '--geojson-mask', 'geojson_mask',
              type=click.Path(), default=None,
              help='GeoJSON file to use for masking raster.  Use "-" to read '
                   'from stdin.  If not provided, original raster will be '
                   'returned')
@format_opt
@all_touched_opt
@click.option('--crop', is_flag=True, default=False,
              help='Crop output raster to the extent of the geometries. '
                   'GeoJSON must overlap input raster to use --crop')
@click.option('-i', '--invert', is_flag=True, default=False,
              help='Inverts the mask, so that areas covered by features are'
                   'masked out and areas not covered are retained.  Ignored '
                   'if using --crop')
@options.force_overwrite_opt