B
    uâT€  ã               @   sx   d Z ddlmZmZ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 G dd„ deƒZdS )zN
Core properties part, corresponds to ``/docProps/core.xml`` part in package.
é    )Úabsolute_importÚdivisionÚprint_functionÚunicode_literals)Údatetimeé   )ÚCONTENT_TYPE)ÚCorePropertiesé   )ÚCT_CoreProperties)ÚPackURI)ÚXmlPartc               @   s4   e Zd ZdZedd„ ƒZedd„ ƒZedd„ ƒZdS )	ÚCorePropertiesPartz‚
    Corresponds to part named ``/docProps/core.xml``, containing the core
    document properties for this document package.
    c             C   s0   |   |¡}|j}d|_d|_d|_t ¡ |_|S )z{
        Return a new |CorePropertiesPart| object initialized with default
        values for its base properties.
        zWord Documentzpython-docxé   )Ú_newÚcore_propertiesÚtitleZlast_modified_byÚrevisionr   ÚutcnowÚmodified)ÚclsÚpackageZcore_properties_partr   © r   úJ/var/www/html/venv/lib/python3.7/site-packages/docx/opc/parts/coreprops.pyÚdefault   s    

zCorePropertiesPart.defaultc             C   s
   t | jƒS )zŽ
        A |CoreProperties| object providing read/write access to the core
        properties contained in this core properties part.
        )r	   Úelement)Úselfr   r   r   r   '   s    z"CorePropertiesPart.core_propertiesc             C   s$   t dƒ}tj}t ¡ }t||||ƒS )Nz/docProps/core.xml)r   ÚCTZOPC_CORE_PROPERTIESr   Únewr   )r   r   ZpartnameÚcontent_typeZcorePropertiesr   r   r   r   /   s
    zCorePropertiesPart._newN)	Ú__name__Ú
__module__Ú__qualname__Ú__doc__Úclassmethodr   Úpropertyr   r   r   r   r   r   r      s   r   N)r#   Ú
__future__r   r   r   r   r   Ú	constantsr   r   Z	corepropsr	   Zoxml.corepropsr   Zpackurir   Úpartr   r   r   r   r   r   Ú<module>   s   