https://github.com/carlosulisesochoa/batch-zip-compressor
Python script to compress files (password protection feature available)
https://github.com/carlosulisesochoa/batch-zip-compressor
compress python zip
Last synced: about 1 year ago
JSON representation
Python script to compress files (password protection feature available)
- Host: GitHub
- URL: https://github.com/carlosulisesochoa/batch-zip-compressor
- Owner: CarlosUlisesOchoa
- Created: 2023-10-03T04:34:47.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-03T04:42:43.000Z (over 2 years ago)
- Last Synced: 2025-03-25T18:40:52.633Z (about 1 year ago)
- Topics: compress, python, zip
- Language: Python
- Homepage:
- Size: 1.95 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Python Batch ZIP Compressor
---
## Overview
This Python script compresses and password-protects files in a given directory. It reads environment variables from a `.env` file to determine the input and output directories, as well as the password to use for encryption.
## Table of Contents
- [Prerequisites](#prerequisites)
- [Installation](#installation)
- [Configuration](#configuration)
- [Usage](#usage)
- [Contributing](#contributing)
- [Contact](#contact)
## Prerequisites
- Python 3.6 or later
- pyminizip package (`pip install pyminizip`)
## Installation
1. Clone this repository.
2. Install the required package: `pip install pyminizip`.
## Configuration
Configure and rename .env.example to .env
- `INPUT_DIR`: The directory containing the files you want to compress.
- `OUTPUT_DIR`: The directory where the compressed files will be saved.
- `PASSWORD`: The password to use for encrypting the compressed files.
Example `.env` file:
```env
# .env.example
INPUT_DIR=input
OUTPUT_DIR=output
PASSWORD=1234
```
## Usage
Open a terminal and navigate to the directory containing the script and the `.env` file. Then, run the script:
```bash
python main.py
```
## Contributing
For contributing to this project, please feel free to [open an issue](https://github.com/CarlosUlisesOchoa/batch-zip-compressor/issues) or submit a pull request.
## Contact
- Website [carlos8a.com](https://carlos8a.com)
- GitHub [@CarlosUlisesOchoa](https://github.com/carlosulisesochoa)
- X [@Carlos8aDev](https://twitter.com/carlos8adev)