Skip to main content

sdgp - Stable Diffusion Get Prompt

Project description

[Installation(Recommended)] | | [sd-get-prompt (Native C Version)]


SDGP (Stable-Diffusion-Get-Prompt)

Easy display for Stable Diffusion tEXt(Meitu iTXt) Exif data. Anyone can copy and paste from GTK+ dialog.

Sample picture is Japanese language but everybodは can understanding through SD(Stable Diffusion) icon picture on right click menu.

Showing Creation AI Configuration Info.


Usage (Python Module)

  1. Use as Library
from sdgp import sdgp

# return dict of iTXt contents
dict = sdgp(path)
  1. commandline
python -m sdgp -i PATH

Usage (Right Clickable)

How to use?

  1. Run to python -m sdgp -i PATH

KDE

  1. create .desktop file.
  2. place to .kde/share/kde4/services/ServiceMenus/
[Desktop Entry]  
Version=1.0  
Type=Application  
Name=sd-get-prompt  
Comment=Get tEXt parametor  
Exec=python -m sdgp -i %f
ServiceTypes=KonqPopupMenu/Plugin  
MimeType=image/png  
Icon=applications-graphics  
Path=  
Terminal=false  
StartupNotify=true  

& Apply to KDE Dolphin service dir and good changes.


XFce

  1. Add right-click action for thunar(python -m sdgp -i %f)

sample


Others

for Other wm(window Manager) and file manager.

  1. Should be reading your file manager manpages. May be could under run Linux Mint and other Cinnamon distribution and Gnome Nautilus, measure file manager too.

Microsoft Windows

GLib and GTK+ needed(MingW, CYgwin, Others).


Installation

This is a desktop application built with Python using the GTK3 toolkit. It leverages PyGObject (the Python bindings for GTK and other GNOME libraries) to create a native user interface.


Features

  • Modern GTK3 Interface: Utilizes the latest GTK3 features for a contemporary look and feel.
  • Pythonic Development: Written entirely in Python, making it easy to read, understand, and extend.
  • Pango Text Rendering: Supports rich text formatting using Pango attributes for enhanced text presentation (e.g., bold, italics, colors, varying font sizes).
  • (Add more specific features of your application here, e.g., "File management," "Data visualization," etc.)

Requirements

Before running the application, ensure you have the necessary dependencies installed.

  • Python 3.x
  • GTK3 Development Files
  • PyGObject

Installation on Linux (Debian/Ubuntu)

  1. Update your package list:
    sudo apt update
    
  2. Install Python 3, GTK3 development files, and PyGObject:
    sudo apt install python3 python3-venv gir1.2-gtk-3.0 python3-gi
    
    gir1.2-gtk-3.0 provides the necessary GObject Introspection data for GTK3, and python3-gi is the Python binding itself.

Installation on Windows (using MSYS2)

For Windows, using MSYS2 is the recommended way to get a working GTK3 development environment.

  1. Download and install MSYS2 from the official website.
  2. Open an MSYS2 UCRT64 (or MINGW64) terminal.
  3. Update the package database:
    pacman -Syu
    
    (You might need to run this multiple times and restart the terminal.)
  4. Install Python, pip, GTK3, and PyGObject:
    pacman -S python3 python3-pip mingw-w64-ucrt-x86_64-gtk3 mingw-w64-ucrt-x86_64-python-gobject
    
    (Adjust ucrt to mingw if you are using the MINGW64 terminal.)

Installation on macOS (using Homebrew)

  1. Install Homebrew if you haven't already:
    /bin/bash -c "$(curl -fsSL [https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh](https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh))"
    
  2. Install GTK3:
    brew install gtk+3
    
  3. Install PyGObject via pip:
    pip3 install PyGObject
    

Setup and Running

It's highly recommended to use a Python virtual environment for dependency management.

  1. Create a virtual environment: When working with GTK and PyGObject, it's crucial to create the virtual environment with access to system site-packages so it can find the installed GTK libraries.

    python3 -m venv venv --system-site-packages
    

    (You can replace venv with your preferred virtual environment name.)

  2. Activate the virtual environment:

    source venv/bin/activate
    

    On Windows (MSYS2):

    source venv/bin/activate
    

    (Or .\venv\Scripts\activate in Command Prompt/PowerShell if not using MSYS2.)

  3. Install project dependencies: Once the virtual environment is active, install any specific Python dependencies listed in requirements.txt.

    pip install -r requirements.txt
    

    (Ensure requirements.txt is in your project's root directory.)

  4. Run the application:

    python your_main_script.py
    

    (Replace your_main_script.py with the actual name of your application's main Python file.)

Contribution (Optional)

If you'd like to contribute to this project, please feel free to fork the repository, make your changes, and submit a pull request.

License (Optional)

This project is licensed under the [Resist-Psychiatry Declaration License & GNU GPL VERSION 3] - see the LICENSE.RPTv1 and LICENSE.GPLv3 file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sdgp-0.95.1.tar.gz (24.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sdgp-0.95.1-py3-none-any.whl (24.3 kB view details)

Uploaded Python 3

File details

Details for the file sdgp-0.95.1.tar.gz.

File metadata

  • Download URL: sdgp-0.95.1.tar.gz
  • Upload date:
  • Size: 24.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.2

File hashes

Hashes for sdgp-0.95.1.tar.gz
Algorithm Hash digest
SHA256 dcd7593d922c49cb59bb325d9f14b2254f299aa3a7cab731976fbe0ecc29fd34
MD5 8247ab978823701925aa811913ba68d3
BLAKE2b-256 45145e1c7359c8ac86dcb18bd9b11fc92ade5160eae8f307c323e1a21fe31ff1

See more details on using hashes here.

File details

Details for the file sdgp-0.95.1-py3-none-any.whl.

File metadata

  • Download URL: sdgp-0.95.1-py3-none-any.whl
  • Upload date:
  • Size: 24.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.2

File hashes

Hashes for sdgp-0.95.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f28f05b19ebe1653460723d88eafd0c8ce475d83802bf335797c685a06cbabaa
MD5 ef101b8cbfa1ec5e35ae5b01e2e708ce
BLAKE2b-256 33c8998ba1e7921b54c7accf08d62ab92c4fdaea795b9234ab9e94efc74db7e5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page