Skip to content

zikani/diskman

Repository files navigation

DiskMan

DiskMan is a modern, cross-platform graphical disk and partition management tool inspired by EaseUS Partition Master, built with Python and PyQt5.


✨ Features

  • Visual Disk Layout: Interactive, graphical representation of disks and partitions.
  • Partition Operations: Clone, resize, move, delete, format, label, check, and defragment partitions.
  • Custom UI: Modern sidebar navigation, custom icons, and themed dialogs.
  • Status & Progress: Real-time feedback and progress bars for long-running operations.
  • Cross-Platform: Works on Windows, Linux, and macOS (where supported).
  • Safe Operations: Most actions are previewed and require confirmation before execution.
  • Extensible: Modular codebase for adding new disk utilities or UI features.
  • Partition Table Support: GPT and MBR partition tables.
  • File System Support: Ext4, NTFS, FAT32, and more.

🖥️ Screenshots

Add screenshots here to showcase the UI and features!


🚀 Getting Started

Prerequisites

  • Python 3.7 or newer
  • PyQt5
  • (Optional) psutil for advanced disk info

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/diskman.git
    cd diskman
  2. Install dependencies:

    pip install -r requirements.txt

    Or manually:

    pip install PyQt5 psutil

🏁 Usage

Run the Application

python -m ui.main_window

Or, if you have an entry script:

python main.py

Command Line Options

  • --debug : Enable debug logging
  • --safe : Run in safe mode (no write operations)

Example:

python main.py --debug --safe

🛠️ Project Structure

diskman/
│
├── ui/
│   ├── main_window.py      # Main application window and UI logic
│   ├── disk_utils.py       # Disk and partition utility functions
│   └── ...                 # Other UI components
│
├── tests/                  # Unit and integration tests
├── requirements.txt
├── README.md
└── .gitignore

🧩 Extending DiskMan

  • Add a new operation:
    Implement the logic in disk_utils.py and add a button in main_window.py.
  • Customize the UI:
    Modify or extend widgets in the ui/ directory.
  • Localization:
    Add translation files and use Qt's translation features.

Core Operation Features

  • CreatePartitionOperation: validates disk/size/filesystem inputs and simulates create + format pipeline.
  • ResizePartitionOperation: validates target changes (new_size/new_start) and simulates resize/move checks.
  • DeletePartitionOperation: validates partition identity and simulates safe delete stages.
  • FormatPartitionOperation: validates filesystem target and simulates format flow with cancellation support.
  • CloneDiskOperation: validates source/target disks and simulates chunked cloning with progress updates.
  • ConvertDiskOperation: validates MBR/GPT target and simulates conversion checkpoints.
  • WipeDiskOperation: validates wipe mode/passes and simulates quick/full wipe progress.
  • OperationService: maps UI intents to operation objects, executes queue, and enforces safe-mode blocks.

🧪 Testing

Run all tests with:

python -m unittest discover tests

🔄 Debug + Feature Workflow

  1. Start in safe mode while iterating on UI/backend operation wiring:
    python main.py --debug --safe
  2. Queue operations from the Disk Management page and use Apply Operations to execute through the backend operation service.
  3. Confirm progress/status messages in the status bar and verify safe mode blocks destructive operations (Format/Delete).
  4. Run tests before switching off safe mode:
    python -m unittest discover tests

🤝 Contributing

Pull requests and feature suggestions are welcome!
Please open an issue to discuss your ideas or report bugs.


📄 License

This project is licensed under the MIT License. See LICENSE for details.


🙏 Credits

  • Inspired by EaseUS Partition Master and GParted
  • Built with PyQt5

About

a modern, windows-platform graphical disk and partition management tool, built with Python and PyQt5.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages