U
    ?h                     @   sb   d Z ddlT ddlT ddlT ddlT ddlT e  dZdd Zdd Z	dd	 Z
e d
k	r^e
e Z d
S )z_Utilities to read and write images in various formats.

The following plug-ins are available:

   )*I   c                    s    fdd|D S )Nc                    s   g | ]} | qS  r   ).0Zseparator_lengthcharr   E/var/www/html/venv/lib/python3.8/site-packages/skimage/io/__init__.py
<listcomp>   s     z_separator.<locals>.<listcomp>r   )r   lengthsr   r   r   
_separator   s    r   c                 C   sD   |  dtd| |  dd |  dtd| | td| dS )z6Add separators and column titles to plugin info table.    =r   )ZPluginDescription   -N)insertr   append)
info_tablecolumn_lengthsr   r   r   _format_plugin_info_table   s    r   c                 C   s   ddl m} dd tD }t|dkr:tdd |D }nd}td | }||g}t|| |D ]f\}}|||}|g}	|	dd tt|d D  t	|	|D ]"\}}
| |
| d|
 d	7 } qq`|  } | S )
z^Add a list of plugins to the module docstring, formatted as
    a ReStructuredText table.
    r   )wrapc                 S   s(   g | ] }|d ks|t |ddfqS )testdescriptionzno description)Zplugin_infoget)r   pr   r   r   r	   &   s    z_update_doc.<locals>.<listcomp>c                 S   s   g | ]\}}t |qS r   )len)r   n_r   r   r   r	   *   s     r   c                 S   s   g | ]}d qS ) r   )r   r   r   r   r   r	   5   s      
)textwrapr   Zavailable_pluginsr   maxWRAP_LENr   extendrangezipljuststrip)docr   r   Zname_lengthZdescription_lengthr   nameZplugin_descriptionZdescription_linesZname_columnr   r   r   r   _update_doc    s$    

 r+   N)__doc__Zmanage_pluginsZsiftZ
collection_ioZ_image_stackZreset_pluginsr#   r   r   r+   r   r   r   r   <module>   s   