U
    ±[ÖeC  ã                   @   sL   d Z ddlmZ ddlmZ ddlmZ G dd„ deƒZG dd„ deƒZd	S )
zÎ
    pyexcel.plugins.sources.file_output
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Representation of output file sources

    :copyright: (c) 2015-2022 by Onni Software Ltd.
    :license: New BSD License
é    )ÚAbstractSource)Úfind_file_type_from_file_name)ÚRENDERERc                   @   s"   e Zd ZdZddd„Zdd„ ZdS )ÚWriteSheetToFilezBPick up 'file_name' field and do single sheet based read and writeNc                 K   sD   t j| f|Ž || _d|kr(| d¡}n
t|dƒ}t ||¡| _d S )NZforce_file_typeÚwrite)r   Ú__init__Ú
_file_nameÚgetr   r   Zget_a_pluginÚ	_renderer)ÚselfÚ	file_nameZrenderer_libraryÚkeywordsÚ	file_type© r   úe/var/www/html/services/stratfitenv/lib/python3.8/site-packages/pyexcel/plugins/sources/file_output.pyr      s    
zWriteSheetToFile.__init__c                 C   s   | j j| j|f| jŽ d S ©N)r
   Zrender_sheet_to_filer   Ú	_keywords)r   Zsheetr   r   r   Ú
write_data   s     ÿÿzWriteSheetToFile.write_data)NN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r   r   r      s   
r   c                   @   s   e Zd ZdZdd„ ZdS )ÚWriteBookToFilezDPick up 'file_name' field and do multiple sheet based read and writec                 C   s   | j j| j|f| jŽ d S r   )r
   Zrender_book_to_filer   r   )r   Úbookr   r   r   r   (   s     ÿÿzWriteBookToFile.write_dataN)r   r   r   r   r   r   r   r   r   r   %   s   r   N)	r   Zpyexcel.sourcer   Zpyexcel.pluginsr   Zpyexcel.internalr   r   r   r   r   r   r   Ú<module>   s
   	