5 Commits

4 changed files with 13 additions and 8 deletions

View File

@@ -26,7 +26,7 @@
"-p", "-p",
"${workspaceFolder}/test", "${workspaceFolder}/test",
"-w", "-w",
"file://${workspaceFolder}/test", "http://localhost/",
"-t", "-t",
"Pictures", "Pictures",
"--theme", "--theme",
@@ -141,9 +141,6 @@
"**/*.css": "css", "**/*.css": "css",
"**/*.html.j2": "jinja-html" "**/*.html.j2": "jinja-html"
}, },
"gitblame.inlineMessageEnabled": true,
"gitblame.inlineMessageFormat": "${author.name}, ${time.ago} • ${commit.summary}",
"gitblame.statusBarMessageFormat": "${author.name} (${time.ago})",
"html.format.indentHandlebars": true, "html.format.indentHandlebars": true,
"html.format.templating": true, "html.format.templating": true,
"html.format.wrapAttributes": "preserve", "html.format.wrapAttributes": "preserve",

View File

@@ -168,8 +168,14 @@ def get_image_info(item: str, folder: str) -> ImageMetadata:
with Image.open(file) as img: with Image.open(file) as img:
logger.info("extracting image information", extra={"file": file}) logger.info("extracting image information", extra={"file": file})
width, height = img.size width, height = img.size
exif = img.getexif() try:
xmpdata = img.getxmp() exif = img.getexif()
except Exception:
exif = None
try:
xmpdata = img.getxmp()
except Exception:
xmpdata = None
except UnidentifiedImageError: except UnidentifiedImageError:
logger.error("cannot identify image file", extra={"file": file}) logger.error("cannot identify image file", extra={"file": file})

View File

@@ -10,6 +10,9 @@ class PhotoGallery {
this.darkModeToggle = this.darkModeToggle.bind(this); this.darkModeToggle = this.darkModeToggle.bind(this);
this.debounce = this.debounce.bind(this); this.debounce = this.debounce.bind(this);
this.detectDarkMode = this.detectDarkMode.bind(this); this.detectDarkMode = this.detectDarkMode.bind(this);
this.detectDarkMode();
this.filter = this.filter.bind(this); this.filter = this.filter.bind(this);
this.finalize = this.finalize.bind(this); this.finalize = this.finalize.bind(this);
this.insertPath = this.insertPath.bind(this); this.insertPath = this.insertPath.bind(this);
@@ -203,7 +206,6 @@ class PhotoGallery {
this.setupDropdownToggle(); this.setupDropdownToggle();
this.setupTagHandlers(); this.setupTagHandlers();
this.setupClickHandlers(); this.setupClickHandlers();
this.detectDarkMode();
window.addEventListener("scroll", this.scrollFunction); window.addEventListener("scroll", this.scrollFunction);
} }

View File

@@ -1,3 +1,3 @@
#!/usr/bin/env bash #!/usr/bin/env bash
LESS=-SR hl $(ls -tr logs/*.{jsonl,jsonl.gz}) --config hl_config.yaml LESS=-SR hl "$(ls -tr logs/*.{jsonl,jsonl.gz})" --config hl_config.yaml