🧹 One Click System Cleaner App using Python – Clean Temp, Cache, and Log Files | FuzzuTech

 Demo :


Click Video πŸ‘‡πŸ‘‡πŸ‘‡































App Name: One Click System Cleaner – FuzzuTech
Tech Stack: Python, CustomTkinter, Tkinter, OS, Shutil
Purpose: Clean Temp Files, Cache, and Log Files with a Single Click

Highlights:

  • πŸ’» Dark Hacker GUI

  • 🧹 Clean Windows Cache, Chrome Cache, and .log files

  • 🧠 Useful for Developers, Coders, and PC Users

  • πŸ”§ Fully Offline Utility

  • ⚡ Fast Execution | Smooth UI | 100% Python

✨ Created by [FuzzuTech] – Subscribe on YouTube for more Viral Python Projects!

πŸŽ₯ Watch the full demo
πŸ“₯ Source Code Here


Code :


<!DOCTYPE html>

<html lang="en">

<head>

  <meta charset="UTF-8" />

  <meta name="viewport" content="width=device-width, initial-scale=1.0" />

  <title>JS Image Compressor</title>

  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" />

  <style>

    body {

      background: linear-gradient(to right, #667eea, #764ba2);

      font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;

      color: #fff;

      padding: 2rem;

      text-align: center;

    }

    .drop-area {

      border: 3px dashed #fff;

      padding: 50px;

      border-radius: 20px;

      transition: background 0.3s;

      cursor: pointer;

    }

    .drop-area.dragover {

      background-color: rgba(255, 255, 255, 0.2);

    }

    img {

      max-width: 100%;

      margin-top: 20px;

      border-radius: 10px;

    }

    .preview {

      margin-top: 1rem;

    }

    .btn-compress {

      margin-top: 20px;

    }

  </style>

</head>

<body>

  <div class="container">

    <h1 class="mb-4">πŸ—œ️ Online Image Compressor</h1>

    <div class="drop-area" id="drop-area">

      <p>Drag & Drop an image here or click to select</p>

      <input type="file" id="fileElem" accept="image/*" hidden>

    </div>

    <div class="preview" id="preview"></div>

    <button class="btn btn-light btn-compress" id="compressBtn" disabled>Compress & Download</button>

  </div>


  <script>

    const dropArea = document.getElementById('drop-area');

    const fileElem = document.getElementById('fileElem');

    const preview = document.getElementById('preview');

    const compressBtn = document.getElementById('compressBtn');

    let selectedFile = null;


    dropArea.addEventListener('click', () => fileElem.click());


    fileElem.addEventListener('change', (e) => handleFiles(e.target.files));

    dropArea.addEventListener('dragover', (e) => {

      e.preventDefault();

      dropArea.classList.add('dragover');

    });

    dropArea.addEventListener('dragleave', () => dropArea.classList.remove('dragover'));

    dropArea.addEventListener('drop', (e) => {

      e.preventDefault();

      dropArea.classList.remove('dragover');

      handleFiles(e.dataTransfer.files);

    });


    function handleFiles(files) {

      if (files.length === 0) return;

      const file = files[0];

      if (!file.type.startsWith('image/')) return alert('Please drop an image file');

      selectedFile = file;

      const reader = new FileReader();

      reader.readAsDataURL(file);

      reader.onload = (e) => {

        preview.innerHTML = `<img src="${e.target.result}" id="previewImage"><p class="text-light mt-2">Original Size: ${(file.size / 1024).toFixed(2)} KB</p>`;

        compressBtn.disabled = false;

      };

    }


    compressBtn.addEventListener('click', () => {

      if (!selectedFile) return;

      const img = new Image();

      img.src = URL.createObjectURL(selectedFile);

      img.onload = () => {

        const canvas = document.createElement('canvas');

        const ctx = canvas.getContext('2d');

        const scale = 0.5;

        canvas.width = img.width * scale;

        canvas.height = img.height * scale;

        ctx.drawImage(img, 0, 0, canvas.width, canvas.height);

        canvas.toBlob((blob) => {

          const url = URL.createObjectURL(blob);

          const a = document.createElement('a');

          a.href = url;

          a.download = 'compressed-image.jpg';

          a.click();

        }, 'image/jpeg', 0.6);

      };

    });

  </script>

</body>

</html>

Comments

Popular posts from this blog

πŸš€ Simple Login & Registration System in Python Tkinter πŸ“±

πŸš€ Create a Python Screen Recorder with Audio (Complete Code)

πŸ“‘ Fuzzu Packet Sniffer – Python GUI for Real-Time IP Monitoring | Tkinter + Scapy