
    vj}                     v    d Z ddlZddlZddlZddlmZ  ej                  d      Zd Zd Z	e
dk(  r e	        yy)z
From the directory containing the static content for a trame application to work,
generate another application specific HTML file.
    N)Pathzdata-launcher-retry=".+"c                     t        | d      5 }|j                         }t        j                  d| d|      }t        |d      5 }|j	                  |       d d d        d d d        y # 1 sw Y   xY w# 1 sw Y   y xY w)Nrzdata-launcher-retry=""w)openreadRETRY_PATTERNsubwrite)
input_fileoutput_fileretry_arrayf_incontentpatched_contentf_outs          >/DATA/.local/lib/python3.12/site-packages/trame/tools/retry.pyupdate_retry_filer      sp    	j#	$))+'++#K=2G
 +s#uKK( $ 
	
 $# 
	s#   7A3A'A3'A0	,A33A<c                     t        j                  d      } | j                  ddd       | j                  dd	       | j                         \  }}t	        |j
                        }|j                         s%| j                          t        j                  d
       |j                         r|dz  }|j                         s%| j                          t        j                  d
       t        |||j                         y )Nz.HTML app file generator for trame applications)descriptionz--retryz[]z*Retry array for launcher. Times are in ms.)defaulthelpz--inputzInput file to use as template)r   r   z
index.html)argparseArgumentParseradd_argumentparse_known_argsr   inputexists
print_helpsysexitis_dirr   retry)parserargs_r   s       r   mainr(      s    $$DF 9   ,  
 %%'GD! djj!J,.
j*djj9    __main__)__doc__r   rer!   pathlibr   compiler
   r   r(   __name__ r)   r   <module>r1      sH   
  	 
 

67):D zF r)   