From 7ecdfcd2a780185360f3802ed33cad2e427f42e2 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Fri, 16 Aug 2024 10:29:05 -0400 Subject: [PATCH] Refactor tuftedoc.py to skip hidden files and directories --- tuftedoc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tuftedoc.py b/tuftedoc.py index 3833c94..e2b0ff5 100644 --- a/tuftedoc.py +++ b/tuftedoc.py @@ -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