diff options
| author | Brett Curran <brettjcurran@gmail.com> | 2026-03-06 11:16:34 +1100 |
|---|---|---|
| committer | Brett Curran <brettjcurran@gmail.com> | 2026-04-15 16:37:51 +1000 |
| commit | 294944abea41b11049c5016bf75081d38f17b495 (patch) | |
| tree | 104772e81020d80892423b8c043b7887d0e4c7ab | |
| parent | 78e06f18a48677ef086a6e02c0d2e0f34ac4bfdd (diff) | |
add dungeondraft files as valid publishable files
| -rw-r--r-- | src/vtt_publish/tui.py | 17 |
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 |
