Last active
July 21, 2023 07:32
-
-
Save dooderstem/6dc0cbb5a41f8a770fb12f4255609312 to your computer and use it in GitHub Desktop.
Revisions
-
dooderstem revised this gist
Jul 21, 2023 . 1 changed file with 0 additions and 80 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,80 +0,0 @@ -
dooderstem revised this gist
Jun 23, 2023 . 1 changed file with 19 additions and 23 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal 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 = '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 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 -
dooderstem revised this gist
Jun 23, 2023 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal 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): -
dooderstem revised this gist
Jun 23, 2023 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal 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 callbacks = { 'ready': readyCallback, 'disconnected': disconnectedCallback, -
dooderstem revised this gist
Jun 23, 2023 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal 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)) -
dooderstem revised this gist
Jun 23, 2023 . 1 changed file with 0 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal 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 = '' def readyCallback(current_user): -
dooderstem revised this gist
Jun 23, 2023 . 1 changed file with 1 addition and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal 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: -
dooderstem revised this gist
Jun 23, 2023 . 1 changed file with 18 additions and 17 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal 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 = '' 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 gimpcord(image, drawable): discord_rpc() -
dooderstem revised this gist
Jun 23, 2023 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal 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)) -
dooderstem revised this gist
Jun 23, 2023 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal 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 = '' # Replace with your Discord application client secret authorization_code = '' # Replace with the authorization code you obtained -
dooderstem revised this gist
Jun 23, 2023 . 1 changed file with 0 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal 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" -
dooderstem revised this gist
Jun 23, 2023 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -13,7 +13,7 @@ authorization_code = '' # Replace with the authorization code you obtained def discord_rpc(): try: import discord_rpc @@ -55,7 +55,7 @@ def errorCallback(errno, errmsg): } def gimpcord(image, drawable): discord_rpc() -
dooderstem revised this gist
Jun 23, 2023 . 1 changed file with 23 additions and 23 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal 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 = '1120074792935100567' client_secret = 'your_client_secret' # Replace with your Discord application client secret authorization_code = '' # Replace with the authorization code you obtained def rpc(): 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)) 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() -
dooderstem revised this gist
Jun 23, 2023 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal 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)) # No module named discord_rpc -
dooderstem revised this gist
Jun 23, 2023 . 1 changed file with 89 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal 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() -
dooderstem revised this gist
Jun 23, 2023 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ -
dooderstem revised this gist
Jun 23, 2023 . 1 changed file with 0 additions and 89 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,89 +0,0 @@ -
dooderstem revised this gist
Jun 23, 2023 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal 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)) # No module named discord_rpc -
dooderstem revised this gist
Jun 23, 2023 . 1 changed file with 89 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal 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() -
dooderstem revised this gist
Jun 23, 2023 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ -
dooderstem revised this gist
Jun 22, 2023 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal 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 ) # Run the plugin -
dooderstem revised this gist
Jun 22, 2023 . 1 changed file with 3 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal 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/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 menu=menu ) # Run the plugin -
dooderstem revised this gist
Jun 22, 2023 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal 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(formatted_date) ### Registration whoiam="\n"+os.path.abspath(sys.argv[0]) -
dooderstem revised this gist
Jun 22, 2023 . 1 changed file with 21 additions and 8 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal 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( 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 revised this gist
Jun 22, 2023 . 1 changed file with 1 addition and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,8 +4,6 @@ from gimpfu import * import os, sys 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 "<Image>/Filters/My Plugin", "*", [], # No input parameters required [], # No return values -
dooderstem revised this gist
Jun 22, 2023 . 1 changed file with 9 additions and 9 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal 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( "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 menu, "*", [], # No input parameters required [], # No return values plugin_function # Your plugin function ) # Run the plugin register_plugin() main() -
dooderstem revised this gist
Jun 22, 2023 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ #! /usr/bin/env python # -*- coding: utf-8 -*- from gimpfu import * -
dooderstem revised this gist
Jun 22, 2023 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal 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() -
dooderstem revised this gist
Jun 22, 2023 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal 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() -
dooderstem revised this gist
Jun 22, 2023 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,8 +2,8 @@ # -*- coding: utf-8 -*- from gimpfu import * import os, sys def plugin_function(image, drawable): pdb.gimp_message("Sent")
NewerOlder