From ae3883ee92ac931e710de553c12240ad3283dfa0 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sat, 15 May 2021 13:54:43 +0200 Subject: add --reverse sorting option --- bin/pyggle | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/pyggle b/bin/pyggle index 92f055c..c5d97f7 100755 --- a/bin/pyggle +++ b/bin/pyggle @@ -329,6 +329,7 @@ if __name__ == "__main__": default=16, help="Zoom Level for reverse geocoding", ) + parser.add_argument("--reverse", action="store_true") 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( @@ -365,7 +366,7 @@ if __name__ == "__main__": ) if args.sort == "time": - thumbnails = sorted(thumbnails, key=lambda t: t.exif_dt) + thumbnails = sorted(thumbnails, key=lambda t: t.exif_dt, reverse=args.reverse) for i, thumbnail in enumerate(thumbnails): html_buf += thumbnail.to_html(i) -- cgit v1.2.3