@@ -102,6 +102,7 @@ def items(
102102 items : Annotated [typer .FileText , typer .Argument ()] = sys .stdin , # type: ignore
103103 source_profile : Optional [str ] = None ,
104104 target_profile : Optional [str ] = None ,
105+ source_protocol : str = "file" ,
105106 chunk_size : int = 100000 ,
106107 update : bool = False ,
107108) -> None :
@@ -114,9 +115,9 @@ def items(
114115
115116 catalog_base_path = os .path .dirname (catalog_path )
116117
117- protocol = urlparse (str (catalog_path )).scheme or "file"
118- source_filesystem = _get_fsspec_fs (protocol , profile = source_profile )
119- target_filesystem = _get_fsspec_fs (protocol , profile = target_profile )
118+ target_protocol = urlparse (str (catalog_path )).scheme or "file"
119+ source_filesystem = _get_fsspec_fs (source_protocol , profile = source_profile )
120+ target_filesystem = _get_fsspec_fs (target_protocol , profile = target_profile )
120121 catalog = Catalog .from_file (catalog_path , FSSpecStacIO (filesystem = target_filesystem ))
121122
122123 collections : set [Collection ] = set ()
@@ -141,8 +142,6 @@ def items(
141142 catalog_base_path , collection .id , item .id , asset_file
142143 )
143144
144- protocol = urlparse (str (asset .href )).scheme or "file"
145-
146145 if not target_filesystem .exists (final_path ) or update :
147146 with (
148147 source_filesystem .open (asset .href ) as s ,
0 commit comments