aboutsummaryrefslogtreecommitdiffstats
path: root/bsie.app
diff options
context:
space:
mode:
authorMatthias Baumgartner <dev@igsor.net>2023-03-01 21:50:04 +0100
committerMatthias Baumgartner <dev@igsor.net>2023-03-01 21:50:04 +0100
commit6eca3af569997f28eee9d169a68cef4bbd6fd789 (patch)
treee66bdd119a7d0b5a57b8fb9c272a9b2ac1892b60 /bsie.app
parentec9105b690974b0246e36769506e735c4edf069a (diff)
downloadbsie-6eca3af569997f28eee9d169a68cef4bbd6fd789.tar.gz
bsie-6eca3af569997f28eee9d169a68cef4bbd6fd789.tar.bz2
bsie-6eca3af569997f28eee9d169a68cef4bbd6fd789.zip
Integrate main app into package
Diffstat (limited to 'bsie.app')
-rwxr-xr-xbsie.app49
1 files changed, 3 insertions, 46 deletions
diff --git a/bsie.app b/bsie.app
index d5808e7..0f6f7bc 100755
--- a/bsie.app
+++ b/bsie.app
@@ -1,49 +1,6 @@
-"""BSIE tools.
-
-Part of the bsie module.
-A copy of the license is provided with the project.
-Author: Matthias Baumgartner, 2022
-"""
-# standard imports
-import argparse
-import typing
-
-# bsie imports
-import bsie
-import bsie.apps
-
-# exports
-__all__: typing.Sequence[str] = (
- 'main',
- )
-
-# config
-apps = {
- 'index' : bsie.apps.index,
- 'info' : bsie.apps.info,
- }
-
-
-## code ##
-
-def main(argv):
- """Black Star File System maintenance tools."""
- parser = argparse.ArgumentParser(description=main.__doc__, prog='bsie')
- parser.add_argument('--version', action='version',
- version='%(prog)s version {}.{}.{}'.format(*bsie.version_info))
- parser.add_argument('app', choices=apps.keys(),
- help='Select the application to run.')
- parser.add_argument('rest', nargs=argparse.REMAINDER)
- # parse
- args = parser.parse_args()
- # run application
- apps[args.app](args.rest)
-
-
-## main ##
-
+#!/usr/bin/env python3
if __name__ == '__main__':
+ import bsie.apps
import sys
- main(sys.argv[1:])
+ bsie.apps.main(sys.argv[1:])
-## EOF ##