From 9a2ca2d78e997eeebc2a2816338e1a7a26ff749f Mon Sep 17 00:00:00 2001 From: Dan Howe Date: Wed, 14 Feb 2018 17:17:55 +1100 Subject: [PATCH] Update docstring --- scripts/photo_to_kml.py | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/scripts/photo_to_kml.py b/scripts/photo_to_kml.py index ecbbe84..3a8048e 100644 --- a/scripts/photo_to_kml.py +++ b/scripts/photo_to_kml.py @@ -3,10 +3,19 @@ This script takes a folder of images, and creates a placemark with a thumbnail of each image, based on the GPS coordinates in the EXIF tags. +Usage: + photo_to_kml.py [-h] IMAGE_FOLDER + +Positional arguments: + IMAGE_FOLDER name of input folder + +Optional arguments: + -h, --help show this help message and exit + Examples: -Create a kml for a folder of photos, named 'images'. - > python photo_to_kml.py images +Create a kml for a folder of photos, named 'image_folder'. +> python photo_to_kml.py image_folder """ @@ -127,9 +136,12 @@ def export_kml_file(dirname, fnames, dirname_thumbs, kml_name): def main(): - parser = argparse.ArgumentParser(usage=__doc__) + parser = argparse.ArgumentParser() parser.add_argument( - 'folder', nargs='?', help='name of input folder', default=None) + 'folder', + metavar='IMAGE_FOLDER', + help='name of input folder', + default=None) args = parser.parse_args() # Get files in image directory