
    ciy                    |    d dl mZ d dlZd dlZd dlmZ ddlmZmZ dd
ZddZ	dddZ
edk    r e
             dS dS )    )annotationsN)Any   )slugifyDEFAULT_SEPARATORargv	list[str]returnargparse.Namespacec                   t          j        d                              d          }|                    ddd           |                    dd	d
                               ddddd                               ddddd                               ddddd                               dt          dd                               dd	dd                               d d	dd!                               d"t
          t          d#t          z                                  d$d%d&                               d'd()                               d*dd+dd,                               d-d%d.                               d/d	dd0                               | d1d                    }|j        r|j	        r
                    d2           |j        rfd3fd4|j        D             |_        |j        r d5                    |j                  |_        n*|j	        r#t          j	                                        |_        |j        sd6|_        |S )7NzSlug string)descriptionInputinput_string*zText to slugify)nargshelpz--stdin
store_truezTake the text from STDIN)actionr   z--no-entitiesstore_falseentitiesTz'Do not convert HTML entities to unicode)r   destdefaultr   z--no-decimaldecimalz&Do not convert HTML decimal to unicodez--no-hexadecimalhexadecimalz*Do not convert HTML hexadecimal to unicodez--max-lengthr   z$Output string length, 0 for no limit)typer   r   z--word-boundaryFzJTruncate to complete word even if length ends up shorter than --max_length)r   r   r   z--save-orderzEWhen set and --max_length > 0 return whole words in the initial orderz--separatorz$Separator between words. By default z--stopwords+zWords to discountz--regex-patternz.Python regex pattern for disallowed characters)r   z--no-lowercase	lowercasezActivate case sensitivityz--replacementsz9Additional replacement rules e.g. "|->or", "%%->percent".z--allow-unicodezAllow unicode charactersr   z.Input strings and --stdin cannot work togetherc                    d}|| vr)                     d                    |                     |                     |d          S )Nz->z7Replacements must be of the form: ORIGINAL{SEP}REPLACED)SEPr   )errorformatsplit)replr   parsers     `/var/www/html/Pagina-Ingenieria-Requisitos/venv/lib/python3.11/site-packages/slugify/__main__.pysplit_checkzparse_args.<locals>.split_check2   sJ    C$V]]be]ffggg::c1%%%    c                &    g | ]} |          S  r)   ).0r#   r&   s     r%   
<listcomp>zparse_args.<locals>.<listcomp>7   s#    MMM4[[..MMMr'     )argparseArgumentParseradd_argument_groupadd_argumentintstrr   
parse_argsr   stdinr    replacementsjoinsysread)r   input_groupargsr$   r&   s      @@r%   r4   r4   
   sS   $???F+++@@K^3"3  5 5 5Y|"<  > > > JX\F  H H H
}9VZE  G G G
*=}^bI  K K K
S!C  E E E
),i  k k k
|Ud  f f f
C9JCFWW  Y Y Y
S0  2 2 2
)M  O O O
([Z^8  : : :
(\  ^ ^ ^
),7  9 9 9 T!""X&&D GTZ GEFFF N	& 	& 	& 	& 	&
 NMMM4;LMMM -HHT%677	 -INN,, Kr'   r;   dict[str, Any]c                    t          | j        | j        | j        | j        | j        | j        | j        | j        | j	        | j
        | j        | j                  S )N)textr   r   r   
max_lengthword_boundary
save_order	separator	stopwordsr   r6   allow_unicode)dictr   r   r   r   r?   r@   rA   rB   rC   r   r6   rD   )r;   s    r%   slugify_paramsrF   D   sZ    $?(?...&(   r'   list[str] | Nonec                    | t           j        } t          |           }t          |          }	 t	          t          di |           dS # t          $ r t          j        d           Y dS w xY w)z Run this program Nr)   )r8   r   r4   rF   printr   KeyboardInterruptexit)r   r;   paramss      r%   mainrN   U   s}    |xdDD!!Fg        s   A	 	A+*A+__main__)r   r	   r
   r   )r;   r   r
   r<   )N)r   rG   )
__future__r   r.   r8   typingr   r   r   r4   rF   rN   __name__r)   r'   r%   <module>rS      s    " " " " " "  



       / / / / / / / /7 7 7 7t   "	 	 	 	 	 zDFFFFF r'   