Metadata-Version: 2.1
Name: minification-station
Version: 0.1.2
Summary: Designed to process and combine multiple files within a specified directory into a single output file.
License: MIT
Keywords: automation,file processing,minification,text processing
Author: myinusa
Requires-Python: >=3.10,<4.0
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.13
Requires-Dist: tqdm (>=4.66.5,<5.0.0)
Project-URL: Changelog, https://github.com/myinusa/minification-station/blob/main/CHANGELOG.md
Project-URL: Documentation, https://github.com/myinusa/minification-station/blob/main/README.md
Project-URL: Repository, https://github.com/myinusa/minification-station
Description-Content-Type: text/markdown

 # Minification Station

Minification Station is a Python script designed to process and combine multiple files within a specified directory into a single output file. This tool is particularly useful for reducing the size of large codebases or collections of text files by removing unnecessary line breaks, comments, etc.

## Table of Contents
- [Minification Station](#minification-station)
  - [Table of Contents](#table-of-contents)
  - [Description](#description)
  - [Usage](#usage)
    - [Command Line Arguments](#command-line-arguments)
  - [FAQ](#faq)
  - [Resources](#resources)
  - [Configuration](#configuration)
  - [Features](#features)
  - [Topics](#topics)
  - [Considerations](#considerations)

## Description
Minification Station is a versatile tool that processes files in a specified directory, combining them into a single output file. It supports various configurations such as specifying the directory to traverse, file extensions to include, and folders to ignore during traversal. The script logs progress and errors, ensuring transparency and ease of debugging.

## Usage
To use Minification Station, follow these steps:
1. Install the required dependencies by running `poetry install`.
2. Run Poetry shell: `poetry shell`.
3. Run the script using Poetry: `poetry run minification_station -d <DIRECTORY>`.
4. The script will process all files in the specified directory and write the combined content to an output file named after the current date and time, appended with the directory's base name.

<img src="./docs/output.gif" width="700" />

### Command Line Arguments
- `-d`, `--directory`: Specifies the directory to traverse (required).

## FAQ
**Q: Can I specify different file extensions or ignore certain files during traversal?**
A: Yes, you can customize these settings by modifying the script accordingly. Refer to the configuration section for more details on how to modify these parameters.

**Q: How do I view logs generated by the script?**
A: Logs are written to a file named `main.log` in the 'logs' directory. You can also view real-time updates via console output if you prefer.

## Resources
- [Python Documentation](https://docs.python.org/3/)
- [tqdm Library](https://pypi.org/project/tqdm/)
- [Logging in Python](https://docs.python.org/3/library/logging.html)

## Configuration
You can configure the script by modifying various parameters in the `config` directory:
- **constants.py**: Contains default settings for file extensions, ignored files and folders, and size limits.
- **args.py**: Defines command line arguments used to run the script.
- **environment_setup.py**: Includes functions to initialize application environment, logging setup, and ensure output directories exist.
- **logging/setup_logging.py**: Contains functions to set up logging configuration with options for file rotation, console output, and error handling.

## Features
- Traverse specified directory recursively.
- Include or exclude files based on extensions.
- Ignore specific folders during traversal.
- Combine file content into a single output file.
- Logging progress and errors for easy debugging.

## Topics
- File Processing
- Directory Traversal
- Logging in Python
- Command Line Interface (CLI)

## Considerations
<!-- - Ensure the specified directory exists before running the script. -->
- Be aware of the size limits to avoid processing files that are too large.
- Customize configurations as needed for different environments or specific use cases.

