Skip to content

Releases: AkshuDev/PHardwareITK

0.1.3.1

12 Dec 17:43
589c1e4
Compare
Choose a tag to compare

Hello,

This version is just a patch for the AddIcon and SetHIcon/LoadHIcon function in GUI.gui_sdl section. (NOTE: can be accessed normally using GUI.gui file)

Regards, Pheonix Studios

[[email protected]] [https://paperexcahange.wixsite.com/pheonixstudios]

0.1.3

09 Dec 10:56
649031d
Compare
Choose a tag to compare

Hello,

This version includes various new functionalities, new functions, and more, refer to the README.md or go to Tests folder at the root dir.

New Functionality includes ->

  1. Better Gui
  2. Bug Fixes
  3. More functions in GUI
  4. More Tests available with better quality
  5. Cross-Platform support for GUI
  6. OS window handler functions to provide or set the Hwnd (Windows), HIcon (Window), etc

Regards, Pheonix Studios

[[email protected]] [https://paperexcahange.wixsite.com/pheonixstudios]

0.1.2

15 Nov 06:25
b3d2fb4
Compare
Choose a tag to compare

Hello,

This version includes various new functionalities, new functions, and more, refer to the README.md or go to Tests folder at the root dir.

Regards, Pheonix Studios

[[email protected]] [https://paperexcahange.wixsite.com/pheonixstudios]

0.1.2.1-PRE

15 Nov 06:21
260e3b1
Compare
Choose a tag to compare
0.1.2.1-PRE Pre-release
Pre-release

Hello,

This is a pre-version for testing for 0.1.2 release

Regards, Pheonix Studios

[[email protected]] [https://paperexcahange.wixsite.com/pheonixstudios]

0.1.2-PRE

15 Nov 06:16
de3b8af
Compare
Choose a tag to compare
0.1.2-PRE Pre-release
Pre-release

Hello,

This is a pre-version for testing for 0.1.2 release

Regards, Pheonix Studios

[[email protected]] [https://paperexcahange.wixsite.com/pheonixstudios]

0.1.1

09 Nov 16:21
9a85faa
Compare
Choose a tag to compare

Hello,

PHardwareITK (Pheonix Hardware Interface Toolkit)

Overview

PHardwareITK, or Pheonix Hardware Interface Toolkit, is a comprehensive Python module developed by Pheonix Studios (AkshuDev/Akshobhya). This toolkit provides a variety of functions and utilities to assist developers in creating complex command-line applications, graphical user interfaces, system utilities, and more. With over 50 distinct functions and multiple specialized toolsets, PHardwareITK is designed to be versatile, modular, and cross-platform, ensuring compatibility with a wide range of development needs.

Table of Contents ->

  1. Module Overview
  2. Key Features
  3. Installation
  4. Usage
  5. Available Toolkits
  6. Dependencies
  7. Contributing
  8. License
  9. Module Overview

Details

PHardwareITK serves as a complete suite for developing hardware-related applications, system utilities, and GUI-based tools. It aims to provide developers with powerful, efficient, and easy-to-use resources that handle everything from hardware interactions and system monitoring to building sophisticated user interfaces.

The module includes a set of tools for both novice and experienced developers, including:

  1. CLI Toolkit: For creating complex command-line applications.
  2. GUI Toolkit: A cross-platform framework for building custom graphical applications.
  3. ErrorSystem: A comprehensive error handling system.
  4. FileSystem: A set of utilities for interacting with various file formats and performing low-level file operations.
    5 HGame: A versatile game development framework that supports multiple rendering engines.

Key Features

  1. Cross-Platform: Works on Linux, Windows, and macOS without modification.
  2. Modular Design: Includes a variety of specialized toolkits that can be used independently or together.
  3. User-Friendly: Functions are designed to be simple to use, but powerful enough for advanced use cases.
  4. Customizable: With features like custom error classes and extendable file system operations, users can adapt the toolkit to their specific needs.
  5. Comprehensive Documentation: Detailed explanations and examples of how to use each feature.

Installation

To install PHardwareITK, follow the steps below:

  1. Ensure you are using Python 3.7 or later.

  2. Install Using the following command

    pip install phardwareitk

  3. Or instead download PheonixAppAPI which includes this module pre-installed inside PheonixAppAPI.Apis.Modules.Pre.phardwareitk

  4. Install PheonixAppAPI

    pip install PheonixAppAPI

  5. Navigate to the downloaded PheonixAppAPI folder/Scripts and run PostInstall.py

  6. Your good to go

Usage

Once the module is installed, you can import it into your Python code. Here are some example use cases:

Example: Using the CLI Toolkit. (Nano Copy in 100 lines)

Command Line Interface ToolKit Test

import sys
import os
import time
import keyboard
import string

sys.path.append(os.path.join(os.path.dirname(__file__), '..'))

from phardwareitk.CLI import cliToolKit as cli
from phardwareitk.Extentions import *

global dataBuffer
dataBuffer:str = ""

def StatusLabel():
    cli.Cursor.MoveCursorToBottom()
    cli.Text.WriteText(" ^X - Exit\t^O - Write Out")
    cli.Cursor.RestoreCursorPosition()

def Start_SuperCLI():
    cli.Screen.ClearScreen()
    cli.Cursor.SetCursorPositionToHome()
    cli.Cursor.SaveCursorPosition()

def WriteOut(data:str):
    cli.Cursor.MoveCursorToBottom()
    cli.Cursor.MoveCursorUp(3)
    cli.Cursor.SetCursorToBeginningOfLine()
    filePath:str = cli.Text.InputText(" File Path: ")
    cli.Screen.ClearCurrentLine()
    cli.Cursor.SetCursorToBeginningOfLine()
    mode:str = cli.Text.InputText(" Mode: ")
    cli.Screen.ClearCurrentLine()
    cli.Cursor.RestoreCursorPosition()

    if os.path.exists(filePath):
        cli.Cursor.MoveCursorToBottom()
        cli.Cursor.MoveCursorUp(3)
        cli.Cursor.SetCursorToBeginningOfLine()
        cli.Text.WriteText(" Path Exist!")
        time.sleep(2)
        cli.Screen.ClearCurrentLine()
        cli.Cursor.RestoreCursorPosition()
    else:
        if not mode.lower() in ["binary", "bin", "normal", "utf-8"]:
            cli.Cursor.MoveCursorToBottom()
            cli.Cursor.MoveCursorUp(3)
            cli.Cursor.SetCursorToBeginningOfLine()
            cli.Text.WriteText(" Mode doesn't Exist! Available Modes -> [binary/bin], [normal/utf-8]")
            time.sleep(2)
            cli.Screen.ClearCurrentLine()
            cli.Cursor.RestoreCursorPosition()
        else:
            if mode.lower() == "binary" or mode.lower() == "bin":
                with open(filePath, "wb") as f:
                    f.write(data.encode())
                    f.close()
            elif mode.lower() == "normal" or mode.lower() == "utf-8":
                with open(filePath, "w") as f:
                    f.write(data)
                    f.close()

    Start_SuperCLI()
    StatusLabel()

def AddData(key:keyboard.KeyboardEvent):
    global dataBuffer

    if key.name == "Enter":
        dataBuffer += "\n"
        cli.Text.WriteText("\n")
        cli.Cursor.SaveCursorPosition()

    if key.name == "space":
        dataBuffer += " "
        cli.Text.WriteText(" ")
        cli.Cursor.SaveCursorPosition()

    if (key.name in string.printable or key.name == "space") and len(key.name) == 1:
        dataBuffer += key.name
        cli.Text.WriteText(key.name)
        cli.Cursor.SaveCursorPosition()

def BackSpace():
    global dataBuffer
    cursor_y, cursor_x = cli.Cursor.CurrentCursorPosition()

    if cursor_x > 1:
        dataBuffer = dataBuffer[:-1]
        cli.Text.BackSpaceChar()

def Delete():
    cursor_y, cursor_x = cli.Cursor.CurrentCursorPosition()

    if cursor_x <= len(dataBuffer):
        del dataBuffer[cursor_x - 1]
        cli.Text.DeleteChar()

def KeyPress():
    if keyboard.is_pressed("up"):
        cli.Cursor.MoveCursorUp(1)
    elif keyboard.is_pressed("right"):
        cli.Cursor.MoveCursorRight(1)
    elif keyboard.is_pressed("left"):
        cli.Cursor.MoveCursorLeft(1)
    elif keyboard.is_pressed("down"):
        cli.Cursor.MoveCursorDown(1)
    elif keyboard.is_pressed("ctrl+x"):
        cli.Screen.ClearScreen()
        cli.Cursor.SetCursorPositionToHome()
        exit(0)
    elif keyboard.is_pressed("ctrl+o"):
        WriteOut(dataBuffer)
    else:
        key_ = keyboard.read_event()
        if not key_.event_type == keyboard.KEY_UP:
            AddData(key_)

Start_SuperCLI()
StatusLabel()
while True:
    KeyPress()

Available Toolkits ->

  1. CLI Toolkit:

The CLI Toolkit provides over 50 distinct functions for creating and managing command-line interfaces (CLI). It enables developers to rapidly build custom CLI applications, similar to nano or other text-based utilities, with minimal lines of code.

Key features:

50+ pre-built functions to handle inputs, outputs, and commands.
Full control over terminal interactions and interface flow.
Support for custom command parsing and input handling.
Text Output/Input with font and colors.

  1. GUI Toolkit

The GUI Toolkit is a cross-platform toolkit that allows developers to create complex graphical user interfaces from scratch. It supports multiple UI frameworks including OpenGL, SDL2. The toolkit is fully customizable and provides advanced functionality for creating modern applications.

Key features:

Full cross-platform support (Linux, Windows, macOS).
Highly customizable and extensible components.
Multiple backend support (OpenGL, SDL2).

  1. PLTEC

PLTEC (Pheonix Language To Executable Converter) is a separate App that is included with PHardwareITK. You can find the full documentation for PLTEC here -> [https://github.com/AkshuDev/PLTEC].

  1. ErrorSystem

The ErrorSystem provides a complete error handling framework with over 50 built-in error classes. It also allows users to create custom error classes for more specialized exceptions.

Key features:

A robust set of error classes for different scenarios.
Custom error class creation for specialized needs.
Detailed error messages and stack trace support.

  1. System

The System folder includes a range of system utilities such as SysUsage, which allows you to monitor and interact with your computer’s hardware and devices.

Key features:

50+ functions to interact with hardware, monitor system performance, and manage processes.
Real-time usage statistics and logging.

  1. Extensions

The Extensions folder provides enhanced versions of Python's built-in functions, adding more capabilities. For example, the printH function in the HyperOut.py file allows for advanced text printing with background and foreground colors, fonts, and other enhancements.

Key features:

Extended versions of basic Python functions.
Support for custom styling (colors, fonts) in terminal output.
Enhanced file writing operations.

  1. FileSystem

The FileSystem toolkit provides utilities for performing file operations, including working with JSON, assembly, and binary formats. The module includes over 50 functions for tasks ranging from simple file manipulation to complex data transformations.

Key features:

Support for JSON, binary, and assembly file formats.
High-level functions for file manipulation and data storage.

  1. HGam...
Read more