
    i                     X    S SK r S SKrS rS rS rS r\S:X  a  \" 5       r\" \5        gg)    Nc                 (    U R                  5       S;   $ )N)truet1)lower)vs    a/var/www/html/banglarbhumi/venv/lib/python3.13/site-packages/paddleocr/tools/end2end/draw_html.pystr2boolr
      s    779***    c                      [         R                  " 5       n U R                  S[        SS9  U R                  S[        SS9  U R                  S[        SS9  U $ )Nz--image_dir )typedefaultz--save_html_pathz./default.htmlz--widthi  )argparseArgumentParseradd_argumentstrintparsers    r	   	init_argsr      sV    $$&F
C<
*>NO
	S9Mr   c                  6    [        5       n U R                  5       $ )N)r   
parse_argsr   s    r	   r   r      s    [Fr   c           	      ^   U R                   nSn[        US5       nUR                  S5        UR                  S5        UR                  S5        / nU R                  n[	        [        [        R                  " U5      5      5       H  u  pgUR                  S5      (       a  M  SR                  XW5      nUR                  S5        UR                  S	U S
35        UR                  SU SU R                   S35        UR                  S5        M     UR                  S5        UR                  S5        UR                  S5        UR                  S5        UR                  S5        UR                  S5        UR                  S5        S S S 5        [        SU 35        g ! , (       d  f       N= f)Nr   wz<html>
<body>
z<table border="1">
zE<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />txtz{}/{}z<tr>
z<td> z
 GTz<td>GT
<img src="z" width=z></td>z</tr>
z<style>
zspan {
z    color: red;
z}
z	</style>
z	</table>
z</html>
</body>
zThe html file saved in )save_html_pathopenwrite	image_dir	enumeratesortedoslistdirendswithformatwidthprint)	args	html_patherr_cnthtml
image_listpathifilenamebases	            r	   draw_debug_imgr2   $   s`   ##IG	i	

%&

)*

S	
 
~~$VBJJt,<%=>KA  ''>>$1DJJx JJxj./JJ+D6$**VLMJJy! ? 	

;

:

&'

5

< 

< 

'(1 
2 
#I;
/0
5 
	s   E,F
F,__main__)r#   r   r
   r   r   r2   __name__r)    r   r	   <module>r6      s@    
 +
B z<D4 r   