Skip to content

Commit

Permalink
Merge pull request #11092 from pjonsson/usage-no-fileext
Browse files Browse the repository at this point in the history
gdal-utils: remove .py from usage text
  • Loading branch information
rouault authored Oct 23, 2024
2 parents 25500c3 + fc67fc7 commit e24c37a
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions swig/python/gdal-utils/osgeo_utils/gdal2tiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -707,8 +707,8 @@ class GDALError(Exception):
def exit_with_error(message: str, details: str = "") -> NoReturn:
# Message printing and exit code kept from the way it worked using the OptionParser (in case
# someone parses the error output)
sys.stderr.write("Usage: gdal2tiles.py [options] input_file [output]\n\n")
sys.stderr.write("gdal2tiles.py: error: %s\n" % message)
sys.stderr.write("Usage: gdal2tiles [options] input_file [output]\n\n")
sys.stderr.write("gdal2tiles: error: %s\n" % message)
if details:
sys.stderr.write("\n\n%s\n" % details)

Expand Down
2 changes: 1 addition & 1 deletion swig/python/gdal-utils/osgeo_utils/gdal_merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ def copy_into(self, t_fh, s_band=1, t_band=1, nodata_arg=None, verbose=0):
# =============================================================================
def Usage(isError):
f = sys.stderr if isError else sys.stdout
print("Usage: gdal_merge.py [--help] [--help-general]", file=f)
print("Usage: gdal_merge [--help] [--help-general]", file=f)
print(
" [-o <out_filename>] [-of <out_format>] [-co <NAME>=<VALUE>]...",
file=f,
Expand Down
2 changes: 1 addition & 1 deletion swig/python/gdal-utils/osgeo_utils/gdal_proximity.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def Usage(isError):
f = sys.stderr if isError else sys.stdout
print(
"""
Usage: gdal_proximity.py [--help] [--help-general]
Usage: gdal_proximity [--help] [--help-general]
<srcfile> <dstfile> [-srcband <n>] [-dstband <n>]
[-of <format>] [-co <name>=<value>]...
[-ot {Byte|UInt16|UInt32|Float32|etc}]
Expand Down
2 changes: 1 addition & 1 deletion swig/python/gdal-utils/osgeo_utils/gdal_retile.py
Original file line number Diff line number Diff line change
Expand Up @@ -949,7 +949,7 @@ def UsageFormat():

def Usage(isError):
f = sys.stderr if isError else sys.stdout
print("Usage: gdal_retile.py [--help] [--help-general]", file=f)
print("Usage: gdal_retile [--help] [--help-general]", file=f)
print(" [-v] [-q] [-co <NAME>=<VALUE>]... [-of <out_format>]", file=f)
print(" [-ps <pixelWidth> <pixelHeight>]", file=f)
print(" [-overlap <val_in_pixel>]", file=f)
Expand Down
2 changes: 1 addition & 1 deletion swig/python/gdal-utils/osgeo_utils/gdalattachpct.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

def Usage(isError=True):
f = sys.stderr if isError else sys.stdout
print("Usage: gdalattachpct.py [--help] [--help-general]", file=f)
print("Usage: gdalattachpct [--help] [--help-general]", file=f)
print(" <pctfile> <infile> <outfile>", file=f)
return 2 if isError else 0

Expand Down
2 changes: 1 addition & 1 deletion swig/python/gdal-utils/osgeo_utils/gdalcompare.py
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ def find_diff(

def Usage(isError=True):
f = sys.stderr if isError else sys.stdout
print("Usage: gdalcompare.py [--help] [--help-general]", file=f)
print("Usage: gdalcompare [--help] [--help-general]", file=f)
print(" [-dumpdiffs] [-skip_binary] [-skip_overviews]", file=f)
print(" [-skip_geolocation] [-skip_geotransform]", file=f)
print(" [-skip_metadata] [-skip_rpc] [-skip_srs]", file=f)
Expand Down
2 changes: 1 addition & 1 deletion swig/python/gdal-utils/osgeo_utils/gdalmove.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ def move(
def Usage(isError=True):
f = sys.stderr if isError else sys.stdout
print(
"""Usage: gdalmove.py [--help] [--help-general]
"""Usage: gdalmove [--help] [--help-general]
[-s_srs <srs_defn>] -t_srs <srs_defn>
[-et <max_pixel_err>] <target_file>""",
file=f,
Expand Down
2 changes: 1 addition & 1 deletion swig/python/gdal-utils/osgeo_utils/ogr_layer_algebra.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
def Usage(isError):
print(
"""
Usage: ogr_layer_algebra.py [--help] [--help-general]
Usage: ogr_layer_algebra [--help] [--help-general]
Union|Intersection|SymDifference|Identity|Update|Clip|Erase
-input_ds <path> [-input_lyr <name>]
-method_ds <path> [-method_lyr <name>]
Expand Down
2 changes: 1 addition & 1 deletion swig/python/gdal-utils/osgeo_utils/ogrmerge.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

def Usage(isError):
f = sys.stderr if isError else sys.stdout
print("Usage: ogrmerge.py [--help] [--help-general]", file=f)
print("Usage: ogrmerge [--help] [--help-general]", file=f)
print(" -o <out_dsname> <src_dsname> [<src_dsname>]...", file=f)
print(" [-f <format>] [-single] [-nln <layer_name_template>]", file=f)
print(" [-update | -overwrite_ds] [-append | -overwrite_layer]", file=f)
Expand Down

0 comments on commit e24c37a

Please sign in to comment.