From 98c53e0359eac89d7a9f71b9c94bf005765d15c5 Mon Sep 17 00:00:00 2001 From: Marcin Owsiany Date: Tue, 5 Sep 2023 16:53:18 +0200 Subject: [PATCH] Add a notion of extension directories. --- bambam.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bambam.py b/bambam.py index e687952..e21e330 100755 --- a/bambam.py +++ b/bambam.py @@ -163,6 +163,7 @@ def load_items(cls, lst, blacklist, load_function, failure_message): def __init__(self): self.data_dirs = [] + self.extensions_dirs = [] self.background_color = None self.background = None @@ -400,6 +401,12 @@ def _add_base_dir(self, base_dir): print(_('Using data directory %s') % data_subdir) self.data_dirs.append(data_subdir) + extensions_subdir = os.path.join(base_dir, 'extensions') + if os.path.isdir(extensions_subdir): + # TRANSLATORS: An extension directory is a directory which contains extensions. + print(_('Using extension directory %s') % extensions_subdir) + self.extensions_dirs.append(extensions_subdir) + def run(self): """ Main application entry point.