diff options
author | Matthias Baumgartner <dev@igsor.net> | 2022-12-15 17:16:25 +0100 |
---|---|---|
committer | Matthias Baumgartner <dev@igsor.net> | 2022-12-15 17:16:25 +0100 |
commit | 5d9526783ad8432c7d6dfe18c0e9f2b37950b470 (patch) | |
tree | 0562bf41b675f2546cb473bb583a78865d73928b /bsie/apps | |
parent | 8e6d27ea75d2c8d68f6dd8b3d529aaa278f291cc (diff) | |
download | bsie-5d9526783ad8432c7d6dfe18c0e9f2b37950b470.tar.gz bsie-5d9526783ad8432c7d6dfe18c0e9f2b37950b470.tar.bz2 bsie-5d9526783ad8432c7d6dfe18c0e9f2b37950b470.zip |
Pipeline.prefix as Namespace instead of URI
Diffstat (limited to 'bsie/apps')
-rw-r--r-- | bsie/apps/index.py | 5 | ||||
-rw-r--r-- | bsie/apps/info.py | 4 |
2 files changed, 4 insertions, 5 deletions
diff --git a/bsie/apps/index.py b/bsie/apps/index.py index aa26d0f..e37684b 100644 --- a/bsie/apps/index.py +++ b/bsie/apps/index.py @@ -26,7 +26,7 @@ __all__: typing.Sequence[str] = ( def main(argv): """Index files or directories into BSFS.""" parser = argparse.ArgumentParser(description=main.__doc__, prog='index') - parser.add_argument('--user', type=URI, default=URI('http://example.com/me'), + parser.add_argument('--user', type=bsfs.URI, default=bsfs.URI('http://example.com/me'), help='') parser.add_argument('--collect', action='append', default=[], help='') @@ -60,9 +60,8 @@ def main(argv): )}, ]) # pipeline builder - prefix = URI(args.user + ('file#' if args.user.endswith('/') else '/file#')) pbuild = builder.PipelineBuilder( - prefix, + bsfs.Namespace(args.user + ('/' if not args.user.endswith('/') else '')), rbuild, ebuild, ) diff --git a/bsie/apps/info.py b/bsie/apps/info.py index 8cc6dca..eaf1f71 100644 --- a/bsie/apps/info.py +++ b/bsie/apps/info.py @@ -12,7 +12,7 @@ import typing # bsie imports from bsie.base import errors from bsie.tools import builder -from bsie.utils.bsfs import URI +from bsie.utils import bsfs # exports __all__: typing.Sequence[str] = ( @@ -48,7 +48,7 @@ def main(argv): ]) # pipeline builder pbuild = builder.PipelineBuilder( - URI('http://example.com/me/file#'), # not actually used + bsfs.Namespace('http://example.com/me/'), # not actually used rbuild, ebuild, ) |