o
    e                     @   s   d dl Z d dlZd dlZd dlmZmZ d dlmZ d dl	m
Z
 ddddd	d
ddddd
Zdd eD Zdd Ze jdd fddZdd ZedkrPe  dS dS )    N)PYPDFIUM_INFOPDFIUM_INFO)_loader_info)setup_loggingzrearrange/merge documentsz list/extract/edit embedded fileszextract imageszextract textzconvert images to PDFzprint info on page objectsz print info on document and pageszrasterize pagesztile pages (N-up)zprint table of contents)
arrangeattachmentszextract-imageszextract-textimgtopdfpageobjectspdfinforendertiletocc              
   C   s&   i | ]}|t d |dd qS )zpypdfium2._cli.-_)	importlibimport_modulereplace).0n r   E/var/www/html/venv/lib/python3.10/site-packages/pypdfium2/__main__.py
<dictcomp>   s   & r   c                  C   sz   t jdt jdd} | jddddt dt d	td
  d | jdd}t	 D ]\}}|j
|||d}t| | q'| S )N	pypdfium2zJCommand line interface to the pypdfium2 library (Python binding to PDFium))progformatter_classdescriptionz	--versionz-vversionz
pypdfium2 z
pdfium z at libpath)actionr   
subcommand)dest)r   help)argparseArgumentParserRawTextHelpFormatteradd_argumentr   r   loader_infoadd_subparsersSubCommandsitems
add_parserCmdToModuleattach)main_parser
subparsersnamer!   	subparserr   r   r   
get_parser   s   r1      c                 C   s6   t  }|| }|js|  d S t|j | d S N)r1   
parse_argsr   
print_helpr+   main)raw_argsparserargsr   r   r   api_main1   s   
r:   c                   C   s   t   t  d S r3   )r   r:   r   r   r   r   cli_main=   s   
r;   __main__)sysr"   r   pypdfium2.versionr   r   pypdfium2_raw.bindingsr   r&   pypdfium2._cli._parsersr   r(   r+   r1   argvr:   r;   __name__r   r   r   r   <module>   s0   
