zipouter
v1.0.5
Published
A simple npm package to extract and process the contents of a zip file, supporting multiple programming languages including Java, JavaScript, Python, and more.
Downloads
3
Maintainers
Readme
zipouter
A simple npm package to extract and process the contents of a zip file.
Installation
npm install zipouter
Additional Package to Install
npm install adm-zip
Usage
const { extractAndProcessZip } = require("zipouter");
or;
import { extractAndProcessZip } from "zipouter";
const zipFileName = "your-zip-file.zip";
extractAndProcessZip(zipFileName)
.then((results) => {
console.log("Compilation Results:", results);
})
.catch((error) => {
console.error("Error:", error.message);
});
Important
Before proceeding further, ensure that you have Java, Node.js, and Python installed on your local machine. You can download and install them from the official websites:
Features
- Extract and process zip files.
- Support for multiple programming languages, including Java, JavaScript, Python, and more.
API Reference
extractAndProcessZip(zipFileName: string): Promise<CompilationResult[]>
Extracts and processes the contents of a zip file.
zipFileName
: The name of the zip file to process.
Returns a promise that resolves to an array of CompilationResult
objects.
CompilationResult
fileName
: Name of the processed file.output
: Compilation output or error message.
Supported Languages
- Java: Files with a
.java
extension. - JavaScript: Files with a
.js
extension. - Python: Files with a
.py
extension.
Example
0.First upload your zip file in the current directory
1.import and use the extractAndProcessZip from zipouter
import { extractAndProcessZip } from "zipouter";
const zipFileName = "example.zip";
extractAndProcessZip(zipFileName)
.then((results) => {
console.log("Compilation Results:", results);
})
.catch((error) => {
console.error("Error:", error);
});
2.Output
License
This project is licensed under the MIT License - see the LICENSE file for details.
Issues
If you encounter any issues or have suggestions, please open an issue on GitHub.