U
    ?hj	                     @   s   d Z ddlZzddlmZ W nF ek
rb   zddlmZ W n  ek
r\   ddlmZ Y nX Y nX dd ZedkrddlZe	e  dS )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/``

    N   )tiff2fsspecc               
   C   s   t jddd} | jdtdd | jdtdd | jd	td
dd | jdtd
dd | jdtd
dd | jdtd
dd | jdtd
dd | jdtd
dd |  }t|j|j|j	|j
|j|j|j|jd d
S )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version)argparseArgumentParseradd_argumentstrint
parse_argsr   r   r   r
   r   r   r   r   ver)parserargs r   F/var/www/html/venv/lib/python3.8/site-packages/tifffile/tiff2fsspec.pymain$   sz                       r   __main__)
__doc__r   r   r   ImportErrorZtifffile.tifffiler   __name__sysexitr   r   r   r   <module>   s   /