Skip to content

Instantly share code, notes, and snippets.

@dooderstem
Last active July 21, 2023 07:32
Show Gist options
  • Select an option

  • Save dooderstem/6dc0cbb5a41f8a770fb12f4255609312 to your computer and use it in GitHub Desktop.

Select an option

Save dooderstem/6dc0cbb5a41f8a770fb12f4255609312 to your computer and use it in GitHub Desktop.

Revisions

  1. dooderstem revised this gist Jul 21, 2023. 1 changed file with 0 additions and 80 deletions.
    80 changes: 0 additions & 80 deletions discord_rpc.py
    Original file line number Diff line number Diff line change
    @@ -1,80 +0,0 @@
    #! /usr/bin/env python
    # -*- coding: utf-8 -*-

    from gimpfu import *
    import os, sys
    import datetime, time
    import discord_rpc

    today = datetime.date.today() # Get today's date
    formatted_date = today.strftime("%d/%m/%Y") # Format the date as DD/MM/YYYY
    client_id = '1120074792935100567'

    def readyCallback(current_user):
    print('Our user: {}'.format(current_user))

    def disconnectedCallback(codeno, codemsg):
    print('Disconnected from Discord rich presence RPC. Code {}: {}'.format( codeno, codemsg))

    def errorCallback(errno, errmsg):
    print('An error occurred! Error {}: {}'.format(errno, errmsg))

    # Note: 'event_name': callback
    callbacks = {
    'ready': readyCallback,
    'disconnected': disconnectedCallback,
    'error': errorCallback,
    }

    def init_discord_rpc():
    discord_rpc.initialize(client_id, callbacks=callbacks, log=False)
    i = 0
    start = time.time()
    while i < 10:
    i += 1
    discord_rpc.update_presence(
    **{
    'details': 'Iteration # {}'.format(i),
    'start_timestamp': start,
    'large_image_key': 'default'
    }
    )

    discord_rpc.update_connection()
    time.sleep(2)
    discord_rpc.run_callbacks()

    # discord_rpc.shutdown()


    def gimpcord(image, drawable):
    init_discord_rpc()


    # 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
    gimpcord, # Your plugin function
    )

    # Run the plugin
    register_plugin()
    main()
  2. dooderstem revised this gist Jun 23, 2023. 1 changed file with 19 additions and 23 deletions.
    42 changes: 19 additions & 23 deletions discord_rpc.py
    Original file line number Diff line number Diff line change
    @@ -4,10 +4,11 @@
    from gimpfu import *
    import os, sys
    import datetime, time
    import discord_rpc

    today = datetime.date.today() # Get today's date
    formatted_date = today.strftime("%d/%m/%Y") # Format the date as DD/MM/YYYY
    client_id = ''
    client_id = '1120074792935100567'

    def readyCallback(current_user):
    print('Our user: {}'.format(current_user))
    @@ -23,36 +24,31 @@ def errorCallback(errno, errmsg):
    'ready': readyCallback,
    'disconnected': disconnectedCallback,
    'error': errorCallback,
    }

    def discord_rpc():
    try:
    import discord_rpc

    discord_rpc.initialize(client_id, callbacks=callbacks, log=False)

    i = 0
    start = time.time()
    while i < 10:
    i += 1
    discord_rpc.update_presence(
    }

    def init_discord_rpc():
    discord_rpc.initialize(client_id, callbacks=callbacks, log=False)
    i = 0
    start = time.time()
    while i < 10:
    i += 1
    discord_rpc.update_presence(
    **{
    'details': 'Iteration # {}'.format(i),
    'start_timestamp': start,
    'large_image_key': 'default'
    })
    discord_rpc.update_connection()
    time.sleep(2)
    discord_rpc.run_callbacks()
    # discord_rpc.shutdown()
    pdb.gimp_message("Connected to Discord RPC")
    }
    )

    discord_rpc.update_connection()
    time.sleep(2)
    discord_rpc.run_callbacks()

    except (ValueError,TypeError,NameError,ImportError) as error:
    pdb.gimp_message(str(error))
    # discord_rpc.shutdown()


    def gimpcord(image, drawable):
    discord_rpc()
    init_discord_rpc()


    # Registration
  3. dooderstem revised this gist Jun 23, 2023. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion discord_rpc.py
    Original file line number Diff line number Diff line change
    @@ -7,7 +7,6 @@

    today = datetime.date.today() # Get today's date
    formatted_date = today.strftime("%d/%m/%Y") # Format the date as DD/MM/YYYY

    client_id = ''

    def readyCallback(current_user):
  4. dooderstem revised this gist Jun 23, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion discord_rpc.py
    Original file line number Diff line number Diff line change
    @@ -19,7 +19,7 @@ def disconnectedCallback(codeno, codemsg):
    def errorCallback(errno, errmsg):
    print('An error occurred! Error {}: {}'.format(errno, errmsg))

    # Note: 'event_name': callback
    # Note: 'event_name': callback
    callbacks = {
    'ready': readyCallback,
    'disconnected': disconnectedCallback,
  5. dooderstem revised this gist Jun 23, 2023. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion discord_rpc.py
    Original file line number Diff line number Diff line change
    @@ -10,7 +10,6 @@

    client_id = ''


    def readyCallback(current_user):
    print('Our user: {}'.format(current_user))

  6. dooderstem revised this gist Jun 23, 2023. 1 changed file with 0 additions and 2 deletions.
    2 changes: 0 additions & 2 deletions discord_rpc.py
    Original file line number Diff line number Diff line change
    @@ -9,8 +9,6 @@
    formatted_date = today.strftime("%d/%m/%Y") # Format the date as DD/MM/YYYY

    client_id = ''
    client_secret = '' # Replace with your Discord application client secret
    authorization_code = '' # Replace with the authorization code you obtained


    def readyCallback(current_user):
  7. dooderstem revised this gist Jun 23, 2023. 1 changed file with 1 addition and 2 deletions.
    3 changes: 1 addition & 2 deletions discord_rpc.py
    Original file line number Diff line number Diff line change
    @@ -13,7 +13,6 @@
    authorization_code = '' # Replace with the authorization code you obtained



    def readyCallback(current_user):
    print('Our user: {}'.format(current_user))

    @@ -28,7 +27,7 @@ def errorCallback(errno, errmsg):
    'ready': readyCallback,
    'disconnected': disconnectedCallback,
    'error': errorCallback,
    }
    }

    def discord_rpc():
    try:
  8. dooderstem revised this gist Jun 23, 2023. 1 changed file with 18 additions and 17 deletions.
    35 changes: 18 additions & 17 deletions discord_rpc.py
    Original file line number Diff line number Diff line change
    @@ -8,11 +8,28 @@
    today = datetime.date.today() # Get today's date
    formatted_date = today.strftime("%d/%m/%Y") # Format the date as DD/MM/YYYY

    client_id = '1120074792935100567'
    client_id = ''
    client_secret = '' # Replace with your Discord application client secret
    authorization_code = '' # Replace with the authorization code you obtained



    def readyCallback(current_user):
    print('Our user: {}'.format(current_user))

    def disconnectedCallback(codeno, codemsg):
    print('Disconnected from Discord rich presence RPC. Code {}: {}'.format( codeno, codemsg))

    def errorCallback(errno, errmsg):
    print('An error occurred! Error {}: {}'.format(errno, errmsg))

    # Note: 'event_name': callback
    callbacks = {
    'ready': readyCallback,
    'disconnected': disconnectedCallback,
    'error': errorCallback,
    }

    def discord_rpc():
    try:
    import discord_rpc
    @@ -39,22 +56,6 @@ def discord_rpc():
    pdb.gimp_message(str(error))


    def readyCallback(current_user):
    print('Our user: {}'.format(current_user))

    def disconnectedCallback(codeno, codemsg):
    print('Disconnected from Discord rich presence RPC. Code {}: {}'.format( codeno, codemsg))

    def errorCallback(errno, errmsg):
    print('An error occurred! Error {}: {}'.format(errno, errmsg))

    # Note: 'event_name': callback
    callbacks = {
    'ready': readyCallback,
    'disconnected': disconnectedCallback,
    'error': errorCallback,
    }

    def gimpcord(image, drawable):
    discord_rpc()

  9. dooderstem revised this gist Jun 23, 2023. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions discord_rpc.py
    Original file line number Diff line number Diff line change
    @@ -34,6 +34,7 @@ def discord_rpc():
    discord_rpc.run_callbacks()
    # discord_rpc.shutdown()
    pdb.gimp_message("Connected to Discord RPC")

    except (ValueError,TypeError,NameError,ImportError) as error:
    pdb.gimp_message(str(error))

  10. dooderstem revised this gist Jun 23, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion discord_rpc.py
    Original file line number Diff line number Diff line change
    @@ -9,7 +9,7 @@
    formatted_date = today.strftime("%d/%m/%Y") # Format the date as DD/MM/YYYY

    client_id = '1120074792935100567'
    client_secret = 'your_client_secret' # Replace with your Discord application client secret
    client_secret = '' # Replace with your Discord application client secret
    authorization_code = '' # Replace with the authorization code you obtained


  11. dooderstem revised this gist Jun 23, 2023. 1 changed file with 0 additions and 2 deletions.
    2 changes: 0 additions & 2 deletions discord_rpc.py
    Original file line number Diff line number Diff line change
    @@ -58,8 +58,6 @@ def gimpcord(image, drawable):
    discord_rpc()




    # Registration
    whoiam="\n"+os.path.abspath(sys.argv[0])
    author="Dooder"
  12. dooderstem revised this gist Jun 23, 2023. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions discord_rpc.py
    Original file line number Diff line number Diff line change
    @@ -13,7 +13,7 @@
    authorization_code = '' # Replace with the authorization code you obtained


    def rpc():
    def discord_rpc():
    try:
    import discord_rpc

    @@ -55,7 +55,7 @@ def errorCallback(errno, errmsg):
    }

    def gimpcord(image, drawable):
    rpc()
    discord_rpc()



  13. dooderstem revised this gist Jun 23, 2023. 1 changed file with 23 additions and 23 deletions.
    46 changes: 23 additions & 23 deletions discord_rpc.py
    Original file line number Diff line number Diff line change
    @@ -8,32 +8,12 @@
    today = datetime.date.today() # Get today's date
    formatted_date = today.strftime("%d/%m/%Y") # Format the date as DD/MM/YYYY

    client_id = ''
    client_secret = '' # Replace with your Discord application client secret
    client_id = '1120074792935100567'
    client_secret = 'your_client_secret' # Replace with your Discord application client secret
    authorization_code = '' # Replace with the authorization code you obtained


    def rpc():
    return


    def readyCallback(current_user):
    print('Our user: {}'.format(current_user))

    def disconnectedCallback(codeno, codemsg):
    print('Disconnected from Discord rich presence RPC. Code {}: {}'.format( codeno, codemsg))

    def errorCallback(errno, errmsg):
    print('An error occurred! Error {}: {}'.format(errno, errmsg))

    # Note: 'event_name': callback
    callbacks = {
    'ready': readyCallback,
    'disconnected': disconnectedCallback,
    'error': errorCallback,
    }

    def gimpcord(image, drawable):
    try:
    import discord_rpc

    @@ -55,7 +35,27 @@ def gimpcord(image, drawable):
    # discord_rpc.shutdown()
    pdb.gimp_message("Connected to Discord RPC")
    except (ValueError,TypeError,NameError,ImportError) as error:
    pdb.gimp_message(str(error)) # No module named discord_rpc
    pdb.gimp_message(str(error))


    def readyCallback(current_user):
    print('Our user: {}'.format(current_user))

    def disconnectedCallback(codeno, codemsg):
    print('Disconnected from Discord rich presence RPC. Code {}: {}'.format( codeno, codemsg))

    def errorCallback(errno, errmsg):
    print('An error occurred! Error {}: {}'.format(errno, errmsg))

    # Note: 'event_name': callback
    callbacks = {
    'ready': readyCallback,
    'disconnected': disconnectedCallback,
    'error': errorCallback,
    }

    def gimpcord(image, drawable):
    rpc()



  14. dooderstem revised this gist Jun 23, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion discord_rpc.py
    Original file line number Diff line number Diff line change
    @@ -55,7 +55,7 @@ def gimpcord(image, drawable):
    # discord_rpc.shutdown()
    pdb.gimp_message("Connected to Discord RPC")
    except (ValueError,TypeError,NameError,ImportError) as error:
    pdb.gimp_message(str(error))
    pdb.gimp_message(str(error)) # No module named discord_rpc



  15. dooderstem revised this gist Jun 23, 2023. 1 changed file with 89 additions and 1 deletion.
    90 changes: 89 additions & 1 deletion discord_rpc.py
    Original file line number Diff line number Diff line change
    @@ -1 +1,89 @@
    ‎‎​
    #! /usr/bin/env python
    # -*- coding: utf-8 -*-

    from gimpfu import *
    import os, sys
    import datetime, time

    today = datetime.date.today() # Get today's date
    formatted_date = today.strftime("%d/%m/%Y") # Format the date as DD/MM/YYYY

    client_id = ''
    client_secret = '' # Replace with your Discord application client secret
    authorization_code = '' # Replace with the authorization code you obtained


    def rpc():
    return


    def readyCallback(current_user):
    print('Our user: {}'.format(current_user))

    def disconnectedCallback(codeno, codemsg):
    print('Disconnected from Discord rich presence RPC. Code {}: {}'.format( codeno, codemsg))

    def errorCallback(errno, errmsg):
    print('An error occurred! Error {}: {}'.format(errno, errmsg))

    # Note: 'event_name': callback
    callbacks = {
    'ready': readyCallback,
    'disconnected': disconnectedCallback,
    'error': errorCallback,
    }

    def gimpcord(image, drawable):
    try:
    import discord_rpc

    discord_rpc.initialize(client_id, callbacks=callbacks, log=False)

    i = 0
    start = time.time()
    while i < 10:
    i += 1
    discord_rpc.update_presence(
    **{
    'details': 'Iteration # {}'.format(i),
    'start_timestamp': start,
    'large_image_key': 'default'
    })
    discord_rpc.update_connection()
    time.sleep(2)
    discord_rpc.run_callbacks()
    # discord_rpc.shutdown()
    pdb.gimp_message("Connected to Discord RPC")
    except (ValueError,TypeError,NameError,ImportError) as error:
    pdb.gimp_message(str(error))




    # 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
    gimpcord, # Your plugin function
    )

    # Run the plugin
    register_plugin()
    main()
  16. dooderstem revised this gist Jun 23, 2023. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions discord_rpc.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    ‎‎​
  17. dooderstem revised this gist Jun 23, 2023. 1 changed file with 0 additions and 89 deletions.
    89 changes: 0 additions & 89 deletions discordRPC.py
    Original file line number Diff line number Diff line change
    @@ -1,89 +0,0 @@
    #! /usr/bin/env python
    # -*- coding: utf-8 -*-

    from gimpfu import *
    import os, sys
    import datetime, time

    today = datetime.date.today() # Get today's date
    formatted_date = today.strftime("%d/%m/%Y") # Format the date as DD/MM/YYYY

    client_id = '1120074792935100567'
    client_secret = 'your_client_secret' # Replace with your Discord application client secret
    authorization_code = '' # Replace with the authorization code you obtained


    def rpc():
    return


    def readyCallback(current_user):
    print('Our user: {}'.format(current_user))

    def disconnectedCallback(codeno, codemsg):
    print('Disconnected from Discord rich presence RPC. Code {}: {}'.format( codeno, codemsg))

    def errorCallback(errno, errmsg):
    print('An error occurred! Error {}: {}'.format(errno, errmsg))

    # Note: 'event_name': callback
    callbacks = {
    'ready': readyCallback,
    'disconnected': disconnectedCallback,
    'error': errorCallback,
    }

    def gimpcord(image, drawable):
    try:
    import discord_rpc

    discord_rpc.initialize(client_id, callbacks=callbacks, log=False)

    i = 0
    start = time.time()
    while i < 10:
    i += 1
    discord_rpc.update_presence(
    **{
    'details': 'Iteration # {}'.format(i),
    'start_timestamp': start,
    'large_image_key': 'default'
    })
    discord_rpc.update_connection()
    time.sleep(2)
    discord_rpc.run_callbacks()
    # discord_rpc.shutdown()
    pdb.gimp_message("Connected to Discord RPC")
    except (ValueError,TypeError,NameError,ImportError) as error:
    pdb.gimp_message(str(error)) # No module named discord_rpc




    # 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
    gimpcord, # Your plugin function
    )

    # Run the plugin
    register_plugin()
    main()
  18. dooderstem revised this gist Jun 23, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion discordRPC.py
    Original file line number Diff line number Diff line change
    @@ -55,7 +55,7 @@ def gimpcord(image, drawable):
    # discord_rpc.shutdown()
    pdb.gimp_message("Connected to Discord RPC")
    except (ValueError,TypeError,NameError,ImportError) as error:
    pdb.gimp_message(str(error))
    pdb.gimp_message(str(error)) # No module named discord_rpc



  19. dooderstem revised this gist Jun 23, 2023. 1 changed file with 89 additions and 1 deletion.
    90 changes: 89 additions & 1 deletion discordRPC.py
    Original file line number Diff line number Diff line change
    @@ -1 +1,89 @@
    ‎‎​
    #! /usr/bin/env python
    # -*- coding: utf-8 -*-

    from gimpfu import *
    import os, sys
    import datetime, time

    today = datetime.date.today() # Get today's date
    formatted_date = today.strftime("%d/%m/%Y") # Format the date as DD/MM/YYYY

    client_id = '1120074792935100567'
    client_secret = 'your_client_secret' # Replace with your Discord application client secret
    authorization_code = '' # Replace with the authorization code you obtained


    def rpc():
    return


    def readyCallback(current_user):
    print('Our user: {}'.format(current_user))

    def disconnectedCallback(codeno, codemsg):
    print('Disconnected from Discord rich presence RPC. Code {}: {}'.format( codeno, codemsg))

    def errorCallback(errno, errmsg):
    print('An error occurred! Error {}: {}'.format(errno, errmsg))

    # Note: 'event_name': callback
    callbacks = {
    'ready': readyCallback,
    'disconnected': disconnectedCallback,
    'error': errorCallback,
    }

    def gimpcord(image, drawable):
    try:
    import discord_rpc

    discord_rpc.initialize(client_id, callbacks=callbacks, log=False)

    i = 0
    start = time.time()
    while i < 10:
    i += 1
    discord_rpc.update_presence(
    **{
    'details': 'Iteration # {}'.format(i),
    'start_timestamp': start,
    'large_image_key': 'default'
    })
    discord_rpc.update_connection()
    time.sleep(2)
    discord_rpc.run_callbacks()
    # discord_rpc.shutdown()
    pdb.gimp_message("Connected to Discord RPC")
    except (ValueError,TypeError,NameError,ImportError) as error:
    pdb.gimp_message(str(error))




    # 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
    gimpcord, # Your plugin function
    )

    # Run the plugin
    register_plugin()
    main()
  20. dooderstem revised this gist Jun 23, 2023. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions discordRPC.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    ‎‎​
  21. dooderstem revised this gist Jun 22, 2023. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion gimpfu.py
    Original file line number Diff line number Diff line change
    @@ -33,7 +33,6 @@ def register_plugin():
    [], # No input parameters required
    [], # No return values
    plugin_function, # Your plugin function
    menu=menu
    )

    # Run the plugin
  22. dooderstem revised this gist Jun 22, 2023. 1 changed file with 3 additions and 2 deletions.
    5 changes: 3 additions & 2 deletions gimpfu.py
    Original file line number Diff line number Diff line change
    @@ -14,7 +14,7 @@ def plugin_function(image, drawable):
    ### Registration
    whoiam="\n"+os.path.abspath(sys.argv[0])
    author="Dooder"
    menu="<Image>/Filters/Jvid/"
    menu="<Image>/Filters/Discord/drp"
    pluginName="drp"
    dateOfCreation=formatted_date
    desc=""
    @@ -32,7 +32,8 @@ def register_plugin():
    "*",
    [], # No input parameters required
    [], # No return values
    plugin_function # Your plugin function
    plugin_function, # Your plugin function
    menu=menu
    )

    # Run the plugin
  23. dooderstem revised this gist Jun 22, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gimpfu.py
    Original file line number Diff line number Diff line change
    @@ -9,7 +9,7 @@
    formatted_date = today.strftime("%d/%m/%Y") # Format the date as DD/MM/YYYY

    def plugin_function(image, drawable):
    pdb.gimp_message("Sent")
    pdb.gimp_message(formatted_date)

    ### Registration
    whoiam="\n"+os.path.abspath(sys.argv[0])
  24. dooderstem revised this gist Jun 22, 2023. 1 changed file with 21 additions and 8 deletions.
    29 changes: 21 additions & 8 deletions gimpfu.py
    Original file line number Diff line number Diff line change
    @@ -3,25 +3,38 @@

    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("Sent")

    ### Registration
    whoiam="\n"+os.path.abspath(sys.argv[0])
    author="Dooder"
    menu="<Image>/Filters/Jvid/"
    pluginName="drp"
    dateOfCreation=formatted_date
    desc=""

    def register_plugin():
    # Register the plugin
    register(
    "my_plugin", # Unique name for your plugin
    "Plugin Label", # The label that appears in GIMP's menus
    "Plugin Description", # Description of your plugin
    "Dooder", # Your name as the plugin author
    "Dooder 2023", # Copyright information
    "2023", # Date of the plugin
    "<Image>/Filters/My 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()
  25. dooderstem revised this gist Jun 22, 2023. 1 changed file with 1 addition and 3 deletions.
    4 changes: 1 addition & 3 deletions gimpfu.py
    Original file line number Diff line number Diff line change
    @@ -4,8 +4,6 @@
    from gimpfu import *
    import os, sys

    menu="<Image>/Filters/My Plugin"

    def plugin_function(image, drawable):
    pdb.gimp_message("Sent")

    @@ -18,7 +16,7 @@ def register_plugin():
    "Dooder", # Your name as the plugin author
    "Dooder 2023", # Copyright information
    "2023", # Date of the plugin
    menu,
    "<Image>/Filters/My Plugin",
    "*",
    [], # No input parameters required
    [], # No return values
  26. dooderstem revised this gist Jun 22, 2023. 1 changed file with 9 additions and 9 deletions.
    18 changes: 9 additions & 9 deletions gimpfu.py
    Original file line number Diff line number Diff line change
    @@ -4,26 +4,26 @@
    from gimpfu import *
    import os, sys

    menu="<Image>/Filters/My Plugin"

    def plugin_function(image, drawable):
    pdb.gimp_message("Sent")

    def register_plugin():
    # Register the plugin
    register(
    register(
    "my_plugin", # Unique name for your plugin
    "Plugin Label", # The label that appears in GIMP's menus
    "Plugin Description", # Description of your plugin
    "Author", # Your name as the plugin author
    "Copyright Year", # Copyright information
    "Plugin Date", # Date of the plugin
    "Dooder", # Your name as the plugin author
    "Dooder 2023", # Copyright information
    "2023", # Date of the plugin
    menu,
    "*",
    "", # No input parameters required
    [], # No input parameters required
    [], # No return values
    plugin_function, # Your plugin function
    menu="<Image>/Filters/My Plugin"
    )

    plugin_function # Your plugin function
    )
    # Run the plugin
    register_plugin()
    main()
  27. dooderstem revised this gist Jun 22, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gimpfu.py
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    #!/usr/bin/env python
    #! /usr/bin/env python
    # -*- coding: utf-8 -*-

    from gimpfu import *
  28. dooderstem revised this gist Jun 22, 2023. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion gimpfu.py
    Original file line number Diff line number Diff line change
    @@ -24,7 +24,6 @@ def register_plugin():
    menu="<Image>/Filters/My Plugin"
    )


    # Run the plugin
    register_plugin()
    main()
  29. dooderstem revised this gist Jun 22, 2023. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion gimpfu.py
    Original file line number Diff line number Diff line change
    @@ -24,7 +24,6 @@ def register_plugin():
    menu="<Image>/Filters/My Plugin"
    )

    # Add the menu item manually

    # Run the plugin
    register_plugin()
  30. dooderstem revised this gist Jun 22, 2023. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions gimpfu.py
    Original file line number Diff line number Diff line change
    @@ -2,8 +2,8 @@
    # -*- coding: utf-8 -*-

    from gimpfu import *
    import os
    import sys
    import os, sys


    def plugin_function(image, drawable):
    pdb.gimp_message("Sent")