summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2021-05-15 13:54:43 +0200
committerDaniel Friesel <derf@finalrewind.org>2021-05-15 13:54:43 +0200
commitae3883ee92ac931e710de553c12240ad3283dfa0 (patch)
tree1c119d4558669be2783773e35fd92c93ff0ea9db
parentdee4a265f9e0bbac7e1cf3921164e30f8c867ce2 (diff)
add --reverse sorting option
-rwxr-xr-xbin/pyggle3
1 files changed, 2 insertions, 1 deletions
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)