diff options
author | Matthias Baumgartner <dev@igsor.net> | 2023-01-16 08:53:41 +0100 |
---|---|---|
committer | Matthias Baumgartner <dev@igsor.net> | 2023-01-16 08:53:41 +0100 |
commit | 76f2cc9206276ca21a395dd9417ff7dfed0467fd (patch) | |
tree | 06eb731a6e352cf191a2bd349886cac6eae08c8b /bsie/apps | |
parent | 17f03ae3d3dc53fe973f37fe4dea4a831b4f97d7 (diff) | |
download | bsie-76f2cc9206276ca21a395dd9417ff7dfed0467fd.tar.gz bsie-76f2cc9206276ca21a395dd9417ff7dfed0467fd.tar.bz2 bsie-76f2cc9206276ca21a395dd9417ff7dfed0467fd.zip |
schema serialization adjustments and app
Diffstat (limited to 'bsie/apps')
-rw-r--r-- | bsie/apps/info.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bsie/apps/info.py b/bsie/apps/info.py index a4e611c..cd28685 100644 --- a/bsie/apps/info.py +++ b/bsie/apps/info.py @@ -26,7 +26,7 @@ __all__: typing.Sequence[str] = ( def main(argv): """Show information from BSIE.""" parser = argparse.ArgumentParser(description=main.__doc__, prog='info') - parser.add_argument('what', choices=('predicates', ), + parser.add_argument('what', choices=('predicates', 'schema'), help='Select what information to show.') args = parser.parse_args(argv) @@ -63,6 +63,9 @@ def main(argv): # show predicates for pred in pipeline.schema.predicates(): print(pred.uri) + elif args.what == 'schema': + # show schema + print(bsfs.schema.to_string(pipeline.schema)) else: # args.what is already checked by argparse raise errors.UnreachableError() |