summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/pyggle4
1 files changed, 4 insertions, 0 deletions
diff --git a/bin/pyggle b/bin/pyggle
index ecef2b1..92f055c 100755
--- a/bin/pyggle
+++ b/bin/pyggle
@@ -330,6 +330,7 @@ if __name__ == "__main__":
help="Zoom Level for reverse geocoding",
)
parser.add_argument("--size", type=int, default=250, help="Thumbnail size [px]")
+ parser.add_argument("--sort", type=str, default="none", help="sort images")
parser.add_argument(
"--spacing", type=float, default=1.1, help="Thumbnail spacing ratio"
)
@@ -363,6 +364,9 @@ if __name__ == "__main__":
Thumbnail(filename, im, size=args.size, with_gps=args.with_nominatim)
)
+ if args.sort == "time":
+ thumbnails = sorted(thumbnails, key=lambda t: t.exif_dt)
+
for i, thumbnail in enumerate(thumbnails):
html_buf += thumbnail.to_html(i)