python crx3
1.0.0
crx3 은 crx 파일을 패키징하고 구문 분석하기 위한 Python 라이브러리입니다.
crx3
PyPI에서 사용할 수 있습니다:
$ python -m pip install crx3
crx3은 공식적으로 Python 3.7+를 지원합니다.
from crx3 import creator
creator . create_private_key_file ( 'output/example-extension.pem' )
from crx3 import creator
creator . create_crx_file ( 'example/example-extension' , 'example/example-extension.pem' , 'output/example-extension.crx' )
from crx3 import verifier
verifier_result , header_info = verifier . verify ( 'example/example-extension.crx' )
assert verifier_result == verifier . VerifierResult . OK_FULL
assert header_info . crx_id == 'jjomgndeajdmncfenopimafofpnflcfo'
assert header_info . public_key == 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMI...FkbU7H8sDQIDAQAB'
crx3 create [-pk PRIVATE_KEY_FILE] [-o OUTPUT_FILE] [-v] source
usage: crx3 create [-h] [-pk PRIVATE_KEY_FILE] [-o OUTPUT_FILE] [-v] source
positional arguments:
source zip file or directory to be packed
options:
-h, --help show this help message and exit
-pk PRIVATE_KEY_FILE, --private-key PRIVATE_KEY_FILE
private key file to be used for signing. If not specified, the program automatically creates a new one and saves it to the same directory as the crx file
-o OUTPUT_FILE, --output OUTPUT_FILE
path to the output crx file
-v, --verbose print more information
crx3 verify [-v] crx_file
usage: crx3 verify [-h] [-v] crx_file
positional arguments:
crx_file crx file
options:
-h, --help show this help message and exit
-v, --verbose print more information