
    |h	                        d Z ddlmZ ddlZ	 ddlmZ ddZe	dk(  rddl
Z
 e
j                   e              yy# e$ r 	 ddlmZ n# e$ r	 ddlmZ Y nw xY wY Fw xY w)	a  Write fsspec ReferenceFileSystem for TIFF file.

positional arguments:
  tifffile              path to the local TIFF input file
  url                   remote URL of TIFF file without file name

optional arguments:
  -h, --help            show this help message and exit
  --out OUT             path to the JSON output file
  --series SERIES       index of series in file
  --level LEVEL         index of level in series
  --key KEY             index of page in file or series
  --chunkmode CHUNKMODE
                        mode used for chunking {None, pages}

For example:

    ``tiff2fsspec ./test.ome.tif https://server.com/path/``

    )annotationsN   )tiff2fsspecc            
        t        j                  dd      } | j                  dt        d       | j                  dt        d       | j                  d	t        d
d       | j                  dt        d
d       | j                  dt        d
d       | j                  dt        d
d       | j                  dt        d
d       | j                  dt        d
d       | j                         }t        |j                  |j                  |j                  |j                  |j                  |j                  |j                  |j                         y)z-Tiff2fsspec command line usage main function.r   z/Write fsspec ReferenceFileSystem for TIFF file.)descriptiontifffilez!path to the local TIFF input file)typehelpurlz)remote URL of TIFF file without file namez--outNzpath to the JSON output file)r	   defaultr
   z--serieszindex of series in filez--levelzindex of level in seriesz--keyzindex of page in file or seriesz--chunkmodez$mode used for chunking {None, pages}z--verzversion of ReferenceFileSystem)outkeyserieslevel	chunkmodeversionr   )argparseArgumentParseradd_argumentstrint
parse_argsr   r   r   r   r   r   r   r   ver)parserargss     S/var/www/html/test/engine/venv/lib/python3.12/site-packages/tifffile/tiff2fsspec.pymainr   &   sc   $$EF #F   CI   c4.L   d1J   T0J   c4.O   3	   c4.N   DHHHH{{jj..	     __main__)returnr   )__doc__
__future__r   r   r   r   ImportErrortifffile.tifffiler   __name__sysexit r   r   <module>r)      sn   * # )%-` zCHHTV o  ))1 )())s3   : A AAAAAAA