diff options
author | Daniel Friesel <derf@finalrewind.org> | 2021-05-15 13:54:43 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2021-05-15 13:54:43 +0200 |
commit | ae3883ee92ac931e710de553c12240ad3283dfa0 (patch) | |
tree | 1c119d4558669be2783773e35fd92c93ff0ea9db | |
parent | dee4a265f9e0bbac7e1cf3921164e30f8c867ce2 (diff) |
add --reverse sorting option
-rwxr-xr-x | bin/pyggle | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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) |