Skip to content

Instantly share code, notes, and snippets.

@dooderstem
Last active July 21, 2023 07:32
Show Gist options
  • Save dooderstem/6dc0cbb5a41f8a770fb12f4255609312 to your computer and use it in GitHub Desktop.
Save dooderstem/6dc0cbb5a41f8a770fb12f4255609312 to your computer and use it in GitHub Desktop.
gimpfu
#! /usr/bin/env python
# -*- coding: utf-8 -*-
from gimpfu import *
import os, sys
import datetime
today = datetime.date.today() # Get today's date
formatted_date = today.strftime("%d/%m/%Y") # Format the date as DD/MM/YYYY
def plugin_function(image, drawable):
pdb.gimp_message(formatted_date)
### Registration
whoiam="\n"+os.path.abspath(sys.argv[0])
author="Dooder"
menu="<Image>/Filters/Discord/drp"
pluginName="drp"
dateOfCreation=formatted_date
desc=""
def register_plugin():
# Register the plugin
register(
pluginName, # Unique name for your plugin
desc+whoiam, # The label that appears in GIMP's menus
desc, # Description of your plugin
author, # Your name as the plugin author
author, # Copyright information
dateOfCreation, # Date of the plugin
menu,
"*",
[], # No input parameters required
[], # No return values
plugin_function, # Your plugin function
)
# Run the plugin
register_plugin()
main()
@dooderstem
Copy link
Author

dooderstem commented Jun 22, 2023

1. not being placed in /Filters/My Plugin
2. pdb.gimp_message("Sent") is not sending "Sent" to GIMP's error console

But the plug-in is registering to GIMP

@dooderstem
Copy link
Author

dooderstem commented Jun 23, 2023

discord_rpc.py: No module named discord_rpc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment