Refactor tuftedoc.py to skip hidden files and directories

This commit is contained in:
2024-08-16 10:29:05 -04:00
parent ac2b437b16
commit 7ecdfcd2a7
+1 -1
View File
@@ -191,7 +191,7 @@ def process_directory(full_path: pathlib.Path) -> Tuple[List[FileInfo], Optional
logger.info(f"Processing directory: {full_path}")
all_items = []
for item in full_path.iterdir():
if item.name in [".DS_Store", "index.md"]:
if item.name in [".DS_Store", "index.md"] or item.name.startswith("."):
continue
is_image_file = is_image(item)
exif_data = get_exif_data(item) if is_image_file else None