Register Plugin Utility

Do you have questions about writing plugins or scripts in Python? Meet the coders here.
Post Reply
User avatar
kgschlosser
Site Admin
Posts: 4647
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Register Plugin Utility

Post by kgschlosser » Fri Jan 13, 2017 7:10 pm

OK i am a horribly lazy person..

I made a little python code snippet that gives you a nice little GUI to enter all of the eg.RegisterPlugin bits..

all of the options are there. the only thing i have to do is finish up the icon pieces for it will base64 encode the thing if you want it to.

but all you have to do is enter all of your information

name
author
version

so on and so forth

when clicking on the view button another window will open with a fully formatted eg.RegisterPlugin complete with the lines already split the standard EG header and import of EG and proper indents and ()'s with the header and import of EG
when splitting lines it will do this if it is greater then 80 characters and it attempt to split it so that the lines end with a space. newline or a period and if not it will just split the bugger (url's and things like that)

it should run from a python script. or you can just download and run the file with python. you have to make sure you have the comtypes library installed if running it from python.

I will has out the icon end of it in the next couple of days. then i want to do something up for a basic plugin layout. where you can add name sand descriptions anf it will auto generate the basic code and you can go from that.. it's a time saver thing

just copy and paste the text in the view window into you new plugin file

again i am lazy LOL

Oh one other thing. it generates a new GUID for you as well...

if you are going to use it from a script you will have to copy everything except for the file header. ( header = all the stuff at the top of the file with a # before it... )
Attachments
RegisterPluginGenerator.py
(11.69 KiB) Downloaded 87 times
If you like the work I have been doing then feel free to Image

pearbear
Experienced User
Posts: 150
Joined: Mon Apr 02, 2012 10:28 pm
Contact:

Re: Register Plugin Utility

Post by pearbear » Sat Jan 14, 2017 12:00 am

kgschlosser wrote:when splitting lines it will do this if it is greater then 80 characters
PEP8 specifies 79 characters or 72 for comments and docstrings:
https://www.python.org/dev/peps/pep-000 ... ine-length

pearbear
Experienced User
Posts: 150
Joined: Mon Apr 02, 2012 10:28 pm
Contact:

Re: Register Plugin Utility

Post by pearbear » Sat Jan 14, 2017 12:24 am

Oh, my bad I see the .flake8 file for EventGhost says max-line-length = 80. That's strange because I thought flake8 was intended to enforce PEP8.

User avatar
kgschlosser
Site Admin
Posts: 4647
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Register Plugin Utility

Post by kgschlosser » Sat Jan 14, 2017 3:07 am

pearbear wrote:Oh, my bad I see the .flake8 file for EventGhost says max-line-length = 80. That's strange because I thought flake8 was intended to enforce PEP8.

i said 80 but i should have stated a max of 79 anything under is 80 is permitted. that's what the flake 8 thing is all about also.. anything under 80

i guess it would be "up to but not including"

sorry.. :-D
If you like the work I have been doing then feel free to Image

Post Reply