Created
June 20, 2022 01:06
-
-
Save llimllib/396a67d4a273049f20246032a58688da to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import glob | |
import os | |
page = """ | |
<!DOCTYPE html> | |
<html><head><title>Zealand Falls Trip</title> | |
<style> | |
img { | |
padding: 5px; | |
} | |
</style> | |
</head> | |
<body> | |
<div id="container"> | |
""" | |
for file in sorted(glob.glob("thumbs/*.png")): | |
fname = os.path.basename(file) | |
page += f'<a href="fullsize/{fname}"><img src="thumbs/{fname}" /></a>\n' | |
page += """ | |
</div> | |
</body> | |
""" | |
with open("index.html", "w") as f: | |
f.write(page) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment