a
    ¡˜ëjO  ã                	   @  sš   U d dl mZ d dlmZmZ d dlmZ d dlmZ d dl	m
Z
 d dlmZ d dlmZ d dlmZ d	Zd
ed< dddddœdddddddœdd„ZdS )é    )Úannotations)ÚIOÚAny)ÚElement)Ú&convert_file_to_html_text_using_pandoc)ÚFileType)Úexactly_one)Úget_last_modified_date)Úpartition_htmlÚorgÚstrÚDETECTION_ORIGINN)ÚfileÚmetadata_filenameÚmetadata_last_modifiedz
str | NonezIO[bytes] | Noner   zlist[Element])Úfilenamer   r   r   ÚkwargsÚreturnc                K  sN   t | |d� | rt| ƒnd}td| |d�}tf ||p6| tj|p@|tdœ|¤ŽS )aq  Partitions an org document. The document is first converted to HTML and then
    partitioned using partition_html.

    Parameters
    ----------
    filename
        A string defining the target filename path.
    file
        A file-like object using "rb" mode --> open(filename, "rb").
    metadata_last_modified
        The last modified date for the document.
    )r   r   Nr   )Zsource_formatr   r   )Útextr   Zmetadata_file_typer   Zdetection_origin)r   r	   r   r
   r   ZORGr   )r   r   r   r   r   Zlast_modifiedZ	html_text© r   úY/mnt/bigstor/www/usecases/.venv/lib/python3.9/site-packages/unstructured/partition/org.pyÚpartition_org   s    ÿûúr   )N)Ú
__future__r   Útypingr   r   Zunstructured.documents.elementsr   Z'unstructured.file_utils.file_conversionr   Zunstructured.file_utils.modelr   Z$unstructured.partition.common.commonr   Z&unstructured.partition.common.metadatar	   Zunstructured.partition.htmlr
   r   Ú__annotations__r   r   r   r   r   Ú<module>   s    ÿû