summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/vtt_publish/tui.py17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/vtt_publish/tui.py b/src/vtt_publish/tui.py
index d33ec26..a9aabce 100644
--- a/src/vtt_publish/tui.py
+++ b/src/vtt_publish/tui.py
@@ -26,8 +26,14 @@ DEFAULT_CONFIG = {
"Misc": "misc"
},
+ "allowed_extentions": [
+ ".webp",
+ ".dungeondraft_map"
+ ],
+
"ignore_patterns": [
"_wip",
+ "wip_",
"_ref",
"backup",
"old_version",
@@ -46,6 +52,7 @@ DEFAULT_CONFIG = {
"clue": "Handouts",
"paper": "Handouts",
+ ".dungeondraft_map": "Maps",
"battlemap": "Maps",
"map": "Maps",
"grid": "Maps",
@@ -363,7 +370,15 @@ class PublisherApp(App):
root = Path(root_path)
- for path in root.rglob("*.webp"):
+ allowed_exts = CONFIG.get("allowed_extentions", [])
+
+ for path in root.rglob("*"):
+ if not path.is_file():
+ continue
+
+ if path.suffix.lower() not in allowed_exts:
+ continue
+
if self.is_ignored(path):
continue