uncrx-rs

Crates.iouncrx-rs
lib.rsuncrx-rs
version0.2.2
sourcesrc
created_at2024-01-14 09:28:44.796966
updated_at2024-01-27 11:46:29.581901
descriptionUncrx is a library that helps you convert a CRX Extension to a zip file that can be easily extracted.
homepage
repositoryhttps://github.com/iltumio/uncrx-rs
max_upload_size
id1099312
size34,377
Manuel Tumiati (iltumio)

documentation

README

Uncrx-rs

License Crates.io Version

Description

Uncrx is a library that helps you convert a CRX Extension to a zip file that can be easily extracted.

Table of Contents

Installation

cargo add uncrx-rs

Usage

// Open the CRX extension
let current_dir = env::current_dir().expect("Failed to get current directory");
let file_path = current_dir.join("src/mock/test-extension.crx");
let data = fs::read(file_path.to_str().unwrap()).expect("Failed to read file");

// Parse the extension
let extension = parse_crx(&data).expect("Failed to parse crx");

// Eventually save the zip section into a separate file for later extraction
let output_file = current_dir.join("out/extension.zip");
fs::write(output_file, &extension.zip).expect("Failed to write file");

Contributing

Feel free to open issues and send PRs. We will evaluate them together in the comment section.

License

This project is licensed under the MIT License.

Commit count: 0

cargo fmt