
    w;3h                     (    d dl mZ d dlmZ d Zd Zy)    N)parse_numtextc                     | j                  ddd       | j                  ddg d       | j                  ddg d	       | j                  d
ddd       y )Ninputs+zSequence of PDF files.)nargshelpz--pagesziSequence of page texts, definig the pages to include from each PDF. Use '_' as placeholder for all pages.)r   defaultr   z--passwordsz\Passwords to unlock encrypted PDFs. Any placeholder may be used for non-encrypted documents.z--outputz-oTz#Target path for the output document)requiredr   )add_argument)parsers    V/var/www/html/audio-gradio/venv/lib/python3.12/site-packages/pypdfium2/_cli/arrange.pyattachr   	   s    
'  
 z	   m	   D4      c                 
   | j                   D cg c]  }|dk(  rd n
t        |       c}| _         t        t        | j                        t        | j                         z
        D ]  }| j                   j                  d         t        t        | j                        t        | j                        z
        D ]  }| j                  j                  d         t        j                  j                         }d}t        | j                  | j                   | j                        D ]>  \  }}}t        j                  ||      }|j                  ||       |t        |      z  }@ |j                  | j                         y c c}w )N_r   )password)pages)r   r   rangelenr   append	passwordspdfiumPdfDocumentnewzipimport_pagessaveoutput)	argspr   dest_pdfindexin_pathr   r   src_pdfs	            r   mainr%   "   s2   BF**MQ!s($a(88MDJ3t{{#c$**o56  

$ 3t{{#c$..&99: $d#$ !!%%'HE$'TZZ$P  $$Wx@gU3W
 MM$++ Ns   F )pypdfium2._helpers_helpersr   pypdfium2._cli._parsersr   r   r%    r   r   <module>r*      s    $ 12r   