HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //proc/1233/root/usr/lib/python3/dist-packages/samba/__pycache__/ms_schema_markdown.cpython-310.pyc
o

�/a��@s�dZddlZddlZddlZddlmmZdd�Zdd�Z	e
dkrYddlZdZe
ej�dkrAed	ejdejd
�e�d�ejdZe
ej�dkrRejdZe	ee�dSdS)
z(Generate LDIF from Github documentation.�NcCs(|jpdd�dd�|D��|jpdS)N�css�|]}t|�VqdS)N)�	innertext)�.0�e�r�:/usr/lib/python3/dist-packages/samba/ms_schema_markdown.py�	<genexpr>s�zinnertext.<locals>.<genexpr>)�text�join�tail)�tagrrrrs
��rcCs�t|��}tjt�dd|���dd�}Wd�n1swYt�d|d�}d}zF|D]6}|jdkrP|dur?|��t	j
�|t|��
��}t|d	�}q0|jd
krf|durf|�t|��dd�d�q0W|durr|��dSdS|dur}|��ww)
z/Read Github documentation-derived schema files.z(?m)^# .*\n?r�xhtml)�
output_formatNz<root>z</root>�h3�w�pz```�
)�open�markdown�re�sub�read�ET�
fromstringr�close�os�pathr
r�strip�write�replace)�in_file�
out_folder�update_file�html�tree�ldf�node�out_pathrrr�read_ms_markdown#s.
��
��
�
�r(�__main__rz.Usage: %s <Schema-Update.md> [<output folder>])�file��)�__doc__rrr�xml.etree.ElementTree�etree�ElementTreerrr(�__name__�sysr!�len�argv�print�stderr�exitr rrrr�<module>s$


�