Skip to content

A simple npm package to extract and process the contents of a zip file.

Notifications You must be signed in to change notification settings

TheCoderAdi/zipouter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

zipouter

npm version License

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

image

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

image

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.

About

A simple npm package to extract and process the contents of a zip file.

Topics

Resources

Stars

Watchers

Forks