From 547124605a9f86469a547fcaf38dc18ae57b707f Mon Sep 17 00:00:00 2001 From: Matthias Baumgartner Date: Thu, 5 Jan 2023 23:55:02 +0100 Subject: essential structures --- tagit/apps/__init__.py | 10 +++++++++ tagit/apps/desktop.py | 55 +++++++++++++++++++++++++++++++++++++++++++++++++ tagit/utils/__init__.py | 18 ++++++++++++++++ tagit/utils/bsfs.py | 15 ++++++++++++++ 4 files changed, 98 insertions(+) create mode 100644 tagit/apps/__init__.py create mode 100644 tagit/apps/desktop.py create mode 100644 tagit/utils/__init__.py create mode 100644 tagit/utils/bsfs.py (limited to 'tagit') diff --git a/tagit/apps/__init__.py b/tagit/apps/__init__.py new file mode 100644 index 0000000..4c64128 --- /dev/null +++ b/tagit/apps/__init__.py @@ -0,0 +1,10 @@ +""" + +Part of the tagit module. +A copy of the license is provided with the project. +Author: Matthias Baumgartner, 2022 +""" +# inner-module imports +from .desktop import main as desktop + +## EOF ## diff --git a/tagit/apps/desktop.py b/tagit/apps/desktop.py new file mode 100644 index 0000000..67733f0 --- /dev/null +++ b/tagit/apps/desktop.py @@ -0,0 +1,55 @@ +""" + +Part of the tagit module. +A copy of the license is provided with the project. +Author: Matthias Baumgartner, 2022 +""" +# standard imports +import typing + +# kivy imports +from kivy.app import App +from kivy.uix.settings import SettingsWithSidebar + +# tagit imports +from tagit.widgets import desktop + +# exports +__all__: typing.Sequence[str] = ( + 'main', + ) + + +## code ## + +class TagitApp(App): + """The tagit main application.""" + + def build(self): + # set settings panel style + self.settings_cls = SettingsWithSidebar + + # set title + self.title = 'tagit v2.0' + + # create widget + return desktop.MainWindow() + + def on_start(self): + # trigger startup operations + self.root.on_startup() + + +def main(): + """Start the tagit GUI. Opens a window to browse images.""" + # Run the GUI + app = TagitApp() + app.run() + + +## main ## + +if __name__ == '__main__': + main() + +## EOF ## diff --git a/tagit/utils/__init__.py b/tagit/utils/__init__.py new file mode 100644 index 0000000..d5a8efe --- /dev/null +++ b/tagit/utils/__init__.py @@ -0,0 +1,18 @@ +""" + +Part of the tagit module. +A copy of the license is provided with the project. +Author: Matthias Baumgartner, 2022 +""" +# imports +import typing + +# inner-module imports +from . import bsfs + +# exports +__all__: typing.Sequence[str] = ( + 'bsfs', + ) + +## EOF ## diff --git a/tagit/utils/bsfs.py b/tagit/utils/bsfs.py new file mode 100644 index 0000000..0ab90a9 --- /dev/null +++ b/tagit/utils/bsfs.py @@ -0,0 +1,15 @@ +"""BSFS bridge, provides BSFS bindings for tagit. + +Part of the tagit module. +A copy of the license is provided with the project. +Author: Matthias Baumgartner, 2022 +""" +# imports +import typing + +# bsfs imports + +# exports +__all__: typing.Sequence[str] = [] + +## EOF ## -- cgit v1.2.3