Skip to content

Commit

Permalink
Added version flag
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderDavid authored and plant99 committed Sep 29, 2020
1 parent b8454a3 commit 0f9467e
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion felicette/cli.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import click
import sys
from rasterio.errors import RasterioIOError
import pkg_resources

from felicette.utils.geo_utils import geocoder_util
from felicette.utils.file_manager import check_sat_path, file_paths_wrt_id
Expand Down Expand Up @@ -47,8 +48,18 @@ def trigger_download_and_processing(landsat_item, bands):
is_flag=True,
help="Show Color Infrared image to highlight vegetation",
)
def main(coordinates, location_name, pan_enhancement, no_preview, vegetation):
@click.option(
"-V",
"--version",
default=False,
is_flag=True,
help="Show the version number and quit",
)
def main(coordinates, location_name, pan_enhancement, no_preview, vegetation, version):
"""Satellite imagery for dummies."""
if version:
version_no = pkg_resources.require("felicette")[0].version
exit_cli(print, f"felicette {version_no}.")
if not coordinates and not location_name:
exit_cli(print, "Please specify either --coordinates or --location-name")
if location_name:
Expand Down

0 comments on commit 0f9467e

Please sign in to comment.