From 5d9526783ad8432c7d6dfe18c0e9f2b37950b470 Mon Sep 17 00:00:00 2001 From: Matthias Baumgartner Date: Thu, 15 Dec 2022 17:16:25 +0100 Subject: Pipeline.prefix as Namespace instead of URI --- bsie/apps/index.py | 5 ++--- bsie/apps/info.py | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'bsie/apps') 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, ) -- cgit v1.2.3