Sindbad~EG File Manager

Current Path : /usr/local/lib/python3.12/site-packages/pywhatkit/core/__pycache__/
Upload File :
Current File : //usr/local/lib/python3.12/site-packages/pywhatkit/core/__pycache__/log.cpython-312.pyc

�

(ٜg��
��ddlZddlZddlmZdedefd�Zdejdededdfd�Zdejd	eded
eddf
d�Zy)�N)�check_number�message�returnc��|jd�}g}|D]Z}d|vr4|jdd�}t|�dk(s|j|�nd�;t|�dk7s�J|j|��\dj	|�S)z@Formats the Message to remove redundant Spaces and Newline chars� �
�rN)�split�replace�len�append�join)r�msg_l�new�xs    �=/usr/local/lib/python3.12/site-packages/pywhatkit/core/log.py�format_messagerst���M�M�#��E�
�C�
���1�9��	�	�$��#�A�!$�Q��1��C�J�J�q�M�$��
��V�q�[��J�J�q�M�
��8�8�C�=���_time�receiverc��tjjd�stdd�}|j	�t|�}tddd��5}t
|�rY|jd|j�d|j�d|j�d|j�d	|j�d
|�d|���nX|jd|j�d|j�d|j�d|j�d	|j�d|�d|���|jd
�|j	�ddd�y#1swYyxYw)z-Logs the Message Information after it is Sent�PyWhatKit_DB.txt�w+�a�utf-8��encoding�Date: �/�
Time: �:�
Phone Number: z

Message: �
Group ID: �
--------------------
N�
�os�path�exists�open�closerr�write�tm_mday�tm_mon�tm_year�tm_hour�tm_min)rrr�files    r�log_messager2s'���7�7�>�>�,�-��&��-���
�
���W�%�G�	
� �#��	8�D���!��J�J������q�����a��
�
��h�u�}�}�o�]^�_d�_k�_k�^l�m!�!)�
�+�g�Y�@�
�

�J�J������q�����a��
�
��h�u�}�}�o�]^�_d�_k�_k�^l�m�%�J�k�'��<�
�	
�
�
�-�.��
�
��
9�	8�	8�s
�CD<�<Er'�captionc��tjjd�stdd�}|j	�t|�}tddd��5}t
|��r\|jd|j�d|j�d|j�d	|j�d
|j�d|�d|�d
|���n[|jd|j�d|j�d|j�d	|j�d
|j�d|�d|�d
|���|jd�|j	�ddd�y#1swYyxYw)z+Logs the Image Information after it is Sentrrrrr)�numberrrr r!r"z
Image: z

Caption: r#r$Nr%)rr'rr3r1s     r�	log_imager6.s4���7�7�>�>�,�-��&��-���
�
���W�%�G�	
� �#��	8�D��x�(��J�J������q�����a��
�
��h�u�}�}�o�]^�_d�_k�_k�^l�m!�!)�
�)�D�6��W�I�O�
�
�J�J������q�����a��
�
��h�u�}�}�o�]^�_d�_k�_k�^l�m�%�J�i��v�[��	�K�
�	
�
�
�-�.��
�
��
9�	8�	8�s
�C%E�E)	r&�time�pywhatkit.core.corer�strr�struct_timer2r6�rr�<module>r<sw��	��,��C��C���t�'�'��3������0�T�%�%��S��C��#��RV�r

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists