diff options
-rwxr-xr-x | bin/pyggle | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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) |