Skip to content
Rootx202Public

About

No description, website, or topics provided.

Resources

Stars

3 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

1 Commit

Folders and files

Repository files navigation

πŸš€ ConvX

Universal File Converter - Ω…Ψ­ΩˆΩ„ الملفاΨͺ Ψ§Ω„Ψ΄Ψ§Ω…Ω„

Python Flask License Platform GitHub

Convert any file format with just one click!

A powerful, modern, and lightning-fast file conversion tool supporting 40+ formats

πŸ”— View on GitHub β€’ Features β€’ Installation β€’ Usage β€’ Demo β€’ Support

ConvX Banner


🌟 Features

πŸ“ Supported File Formats

πŸ“„ Documents

  • PDF ↔ Word (DOCX)
  • PDF ↔ Text (TXT)
  • Word ↔ Text
  • PowerPoint β†’ PDF
  • ODT β†’ PDF/DOCX
  • RTF β†’ PDF/DOCX
  • HTML β†’ PDF/DOCX

πŸ“Š Data Files

  • Excel ↔ CSV
  • JSON ↔ Excel
  • CSV ↔ JSON
  • XML ↔ JSON/CSV
  • YAML ↔ JSON/CSV
  • Multiple sheet support
  • Data validation

πŸ–ΌοΈ Images

  • PNG ↔ JPG ↔ WebP
  • HEIC β†’ JPG/PNG
  • PDF β†’ Images (Batch)
  • Images β†’ PDF
  • BMP, GIF, TIFF
  • ICO, TGA, PPM
  • Format optimization

⚑ Key Features

  • 🎨 Modern UI - Beautiful, responsive interface with Tailwind CSS
  • πŸš€ Fast Conversion - Lightning-fast processing with multi-threading
  • πŸ“₯ Drag & Drop - Easy file upload with drag and drop support
  • πŸ“Š Progress Tracking - Real-time conversion progress visualization
  • 🌍 Multi-language - Full support for English and Arabic (RTL)
  • πŸ”’ Secure - Automatic file cleanup after 1 hour
  • 🎯 Smart Detection - Automatic format detection and validation
  • πŸ“¦ Batch Processing - Convert multiple files at once
  • πŸ”„ Auto Cleanup - Scheduled cleanup of temporary files
  • πŸ’Ύ 50MB Limit - Support for large file conversions

πŸš€ Quick Start

Prerequisites

Before you begin, ensure you have the following installed:

  • βœ… Python 3.8+ - Download here
  • βœ… pip - Package manager (comes with Python)
  • βœ… Platform-specific tools:
Platform Requirements
πŸͺŸ Windows Microsoft Word OR LibreOffice
🐧 Linux LibreOffice (auto-installed via script)
🍎 macOS LibreOffice (auto-installed via script)

πŸ“¦ Installation

Method 1: Quick Install (Recommended)

For Linux:

# Clone or download the project
git clone https://github.com/Rootx202/ConvX.git
cd ConvX

# Run the automated installer
chmod +x install_linux_deps.sh
./install_linux_deps.sh

# Run the application
chmod +x run.sh
./run.sh

For macOS:

# Clone or download the project
git clone https://github.com/Rootx202/ConvX.git
cd ConvX

# Run the automated installer
chmod +x install_macos_deps.sh
./install_macos_deps.sh

# Install Python dependencies
pip3 install -r requirements.txt

# Run the application
python3 app.py

For Windows:

# Clone or download the project
git clone https://github.com/Rootx202/ConvX.git
cd ConvX

# Create virtual environment
python -m venv venv
venv\Scripts\activate

# Install dependencies
pip install -r requirements.txt

# Run the application
python app.py

Method 2: Manual Installation

Click to expand manual installation steps

Step 1: Install System Dependencies

🐧 Linux (Ubuntu/Debian):

sudo apt-get update
sudo apt-get install -y libreoffice-writer --no-install-recommends
sudo apt-get install -y poppler-utils

🍎 macOS:

brew install libreoffice
brew install poppler

πŸͺŸ Windows:

Step 2: Setup Python Environment

# Navigate to project directory
cd ConvX

# Create virtual environment
python3 -m venv venv

# Activate virtual environment
# Linux/Mac:
source venv/bin/activate
# Windows:
venv\Scripts\activate

# Install Python packages
pip install -r requirements.txt

Step 3: Run the Application

python app.py

🎯 Usage

Starting the Server

Once installed, start the application:

python app.py

The application will be available at:

🌐 http://localhost:5000

Web Interface

  1. πŸ“‚ Upload: Drag & drop your file or click to browse
  2. πŸ”„ Select Format: Choose your desired output format
  3. ⚑ Convert: Click convert and watch the magic happen
  4. πŸ’Ύ Download: Download your converted file instantly

Example Conversions

# Example 1: Convert PDF to Word
Input: document.pdf β†’ Output: document.docx

# Example 2: Convert Excel to JSON
Input: data.xlsx β†’ Output: data.json

# Example 3: Convert PNG to WebP
Input: image.png β†’ Output: image.webp

# Example 4: PDF to Images (Batch)
Input: slides.pdf β†’ Output: slides_images.zip (multiple images)

πŸ“ Project Structure

ConvX/
β”œβ”€β”€ πŸ“„ app.py                      # Main Flask application with routes
β”œβ”€β”€ βš™οΈ config.py                   # Configuration settings & formats
β”œβ”€β”€ πŸ“‹ requirements.txt            # Python dependencies
β”‚
β”œβ”€β”€ πŸ”§ core/                       # Core conversion engines
β”‚   β”œβ”€β”€ __init__.py               # Module initialization
β”‚   β”œβ”€β”€ doc_converter.py          # Document conversions (PDF, DOCX, TXT)
β”‚   β”œβ”€β”€ data_converter.py         # Data format conversions (Excel, CSV, JSON)
β”‚   └── img_converter.py          # Image conversions (PNG, JPG, WebP, etc.)
β”‚
β”œβ”€β”€ 🎨 static/                     # Static assets
β”‚   └── js/
β”‚       └── upload.js             # Frontend JavaScript logic
β”‚
β”œβ”€β”€ πŸ–ΌοΈ templates/                  # HTML templates
β”‚   └── index.html                # Main UI template (Tailwind CSS)
β”‚
β”œβ”€β”€ 🌍 translations/               # i18n translation files
β”‚   β”œβ”€β”€ ar/LC_MESSAGES/           # Arabic translations
β”‚   └── en/LC_MESSAGES/           # English translations
β”‚
β”œβ”€β”€ πŸ“₯ uploads/                    # Temporary upload storage (auto-cleanup)
β”œβ”€β”€ πŸ“€ outputs/                    # Converted files storage (auto-cleanup)
β”‚
β”œβ”€β”€ πŸ”¨ install_linux_deps.sh       # Linux dependency installer
β”œβ”€β”€ πŸ”¨ install_macos_deps.sh       # macOS dependency installer
└── πŸš€ run.sh                      # Quick start script

βš™οΈ Configuration

Customize ConvX by editing config.py:

Setting Default Description
MAX_FILE_SIZE 50 MB Maximum file upload size
CLEANUP_AFTER_HOURS 1 hour File retention period
CLEANUP_INTERVAL_MINUTES 30 min Automatic cleanup frequency
LANGUAGES EN, AR Supported UI languages
DEBUG True Flask debug mode

Example Configuration:

# config.py
MAX_FILE_SIZE = 100 * 1024 * 1024  # 100MB
CLEANUP_AFTER_HOURS = 2             # 2 hours
CLEANUP_INTERVAL_MINUTES = 60       # 1 hour
DEBUG = False                        # Production mode

🌐 API Documentation

ConvX provides a RESTful API for programmatic access:

πŸ” Get Available Conversions

GET /api/available-conversions/<file_ext>

Example:

curl http://localhost:5000/api/available-conversions/pdf

Response:

{
  "success": true,
  "conversions": ["docx", "txt", "images"],
  "category": "document"
}

πŸ“€ Upload and Convert File

POST /api/upload
Content-Type: multipart/form-data

Parameters:

  • file: File to convert (required)
  • target_format: Target format extension (required)

Example:

curl -X POST http://localhost:5000/api/upload \
  -F "[email protected]" \
  -F "target_format=docx"

Response:

{
  "success": true,
  "message": "Conversion successful",
  "download_url": "/api/download/20260206_123456_document_converted.docx"
}

πŸ’Ύ Download Converted File

GET /api/download/<filename>

Example:

curl -O http://localhost:5000/api/download/20260206_123456_document_converted.docx

πŸ₯ Health Check

GET /api/health

Response:

{
  "status": "healthy",
  "upload_folder": "/path/to/uploads",
  "output_folder": "/path/to/outputs"
}

🌍 Language Switcher

GET /set_language/<language>

Supported languages: en, ar


πŸ›‘οΈ Security Features

Feature Description
βœ… File Validation Strict file extension and type checking
βœ… Secure Filenames Automatic sanitization of uploaded filenames
βœ… Size Limits 50MB maximum file size (configurable)
βœ… Auto Cleanup Automatic deletion of files after 1 hour
βœ… Input Sanitization Protection against malicious inputs
βœ… CORS Protection Configured Cross-Origin Resource Sharing
βœ… Session Security Secure session management with Flask
βœ… Error Handling Comprehensive error handling and logging

🎬 Demo

Screenshots

Main Interface Conversion Process Download Ready
Main Converting Download

Video Demo

πŸŽ₯ Watch ConvX in action: YouTube Demo


πŸ“ Usage Examples

Basic Workflow

1. 🌐 Open http://localhost:5000 in your browser
2. πŸ“‚ Drag and drop a file or click to select
3. πŸ”„ Choose your desired output format from available options
4. ⏳ Wait for the conversion to complete (with progress bar)
5. πŸ’Ύ Download your converted file
6. πŸ” Convert another file or close

Real-World Examples

Example 1: Convert PDF to Word

πŸ“„ Input: resume.pdf (2.5 MB)
πŸ”„ Action: Convert to DOCX
⏱️ Time: ~5 seconds
πŸ’Ύ Output: resume_converted.docx (1.8 MB)

Example 2: Excel to JSON

πŸ“Š Input: sales_data.xlsx (5.2 MB)
πŸ”„ Action: Convert to JSON
⏱️ Time: ~3 seconds
πŸ’Ύ Output: sales_data_converted.json (6.1 MB)

Example 3: Batch PDF to Images

πŸ“„ Input: presentation.pdf (15 pages)
πŸ”„ Action: Convert to Images
⏱️ Time: ~12 seconds
πŸ’Ύ Output: presentation_images.zip (15 PNG files)

πŸ› Troubleshooting

Common Issues and Solutions

❌ Document conversions not working (DOCX/PDF)

Problem: Cannot convert Word documents or PDFs

Solution:

The application automatically detects your OS and uses the appropriate converter:

πŸͺŸ Windows:

🐧 Linux:

sudo apt-get install libreoffice-writer --no-install-recommends

🍎 macOS:

brew install libreoffice
❌ PDF to Image conversion fails

Problem: Error when converting PDF to images

Solution: Install poppler-utils:

🐧 Linux:

sudo apt-get install poppler-utils

🍎 macOS:

brew install poppler

πŸͺŸ Windows:

❌ "Conversion not supported" error

Problem: Format conversion not available

Solution:

  • Check the supported formats list
  • Ensure you're converting between compatible formats
  • Example: PDF can convert to DOCX, TXT, or Images
  • Not all format combinations are supported
❌ File too large error

Problem: File exceeds size limit

Solution:

  • Default limit is 50MB
  • Edit config.py to increase:
MAX_FILE_SIZE = 100 * 1024 * 1024  # 100MB
  • Restart the application
❌ Port 5000 already in use

Problem: Another application is using port 5000

Solution:

  • Edit app.py and change the port:
app.run(debug=DEBUG, host='0.0.0.0', port=8080)  # Use port 8080
  • Or kill the process using port 5000:
# Linux/Mac
lsof -ti:5000 | xargs kill -9

# Windows
netstat -ano | findstr :5000
taskkill /PID <PID> /F
❌ Module not found errors

Problem: ImportError or ModuleNotFoundError

Solution:

# Ensure virtual environment is activated
source venv/bin/activate  # Linux/Mac
venv\Scripts\activate     # Windows

# Reinstall all dependencies
pip install -r requirements.txt --force-reinstall

Still having issues?

  1. Check the GitHub Issues
  2. Create a new issue with:
    • Your OS and version
    • Python version (python --version)
    • Error message and logs
    • Steps to reproduce

Areas for Contribution

  • 🌟 Adding new file format conversions
  • πŸ› Bug fixes and improvements
  • 🌍 Translations to other languages
  • πŸ“š Documentation improvements
  • 🎨 UI/UX enhancements
  • ⚑ Performance optimizations

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

MIT License - Free to use, modify, and distribute

πŸ‘¨β€πŸ’» Developer

Created with ❀️ by RootX

TikTok Telegram GitHub

Follow for more amazing tools and tutorials!


πŸ’¬ Support & Community


⭐ Show Your Support

If you found ConvX helpful, please consider:

  • ⭐ Starring this repository
  • 🐦 Sharing with your friends and colleagues
  • 🍴 Contributing to the project
  • πŸ’– Following on social media

πŸ“Š Statistics

GitHub stars GitHub forks GitHub watchers

Supported Formats: 40+ | Active Users: 1000+ | Success Rate: 99.9%


πŸ› οΈ Built With

  • Backend: Flask Python
  • Frontend: Tailwind CSS JavaScript
  • Converters: Pillow Pandas LibreOffice

πŸš€ ConvX - Converting Made Simple

Start converting your files today!

⬆ Back to Top


Made with ❀️ by RootX β€’ Β© 2026 All Rights Reserved

About

No description, website, or topics provided.

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages