External Export Plugin

Do you have questions about writing plugins or scripts in Python? Meet the coders here.

External Export Plugin

Postby kgschlosser » Fri Dec 09, 2016 6:11 am

This is for the Plugin Developers.

Since we are making the push to the eg.plugin file type, I made a little python script to Export Plugins.

edit the 2 variables listed below in the script

PLUGIN_PATH, it is defaulted to c:\programdata\eventghost\plugins
SAVE_PATH, destination folder THIS IS NOT SET AND HAS TO BE BEFORE USE. THE FOLDER ALSO HAS TO BE MADE BEFORE USE.

All this does is loads the plugins and creates a list of names to select from. then it will make the .egplugin file for the plugin that has been chosen. it will automatically overwrite any existing .egplugin wile with the same name. I have set the script to add the plugin version to the name of the .egplugin file

I thought it would be useful so i made up something simple for it.

USE:
at a Command Line and in the directory the script is in python ExportPlugin.py

I just made a shortcut and set the working directory to where the script file is so i can just double click it.
Attachments
ExportPlugin.py
(10.99 KiB) Downloaded 27 times
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
 
Posts: 1854
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: External Export Plugin

Postby Sem;colon » Sat Dec 10, 2016 2:56 pm

Hi K,

what's the benefit over just exporting a plugin from the EventGhost UI?
Sem;colon
Experienced User
 
Posts: 571
Joined: Sat Feb 18, 2012 10:51 am
Location: Germany

Re: External Export Plugin

Postby kgschlosser » Fri Dec 16, 2016 8:34 am

well if using eg .4 you would have to go to a command prompt and start EG in debugging mode. little inconvenient

and to be honest i haven't looked for the location of the plugin exporter in .5 and I have not stumbled across it either in any of the drop down menus. don't know if it is hidden else where.

it's more of a convenience thing if you happen to have a bunch of plugins you want to do. because the dialog stays open and all ya have to do is select the plugin and press OK. I think the EG dialog closes for each export. can't remember to be honest

this also appends the version to the file name. so tracking version changes among a single plugin is a little easier for the dev. and when you bean starts going (like mine) and ya can't remember what ya did and what version is in the egplugin file you won't have to open it and load the info.py to read the version. ya just have to gander at the file name. I don't know about you but my computer hates me because of the sheer number of things i have going on. I really need to add another 16 gig of memory to this thing. it starts having issues. so the less i have to have open the better.
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
 
Posts: 1854
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: External Export Plugin

Postby Sem;colon » Fri Dec 16, 2016 3:34 pm

kgschlosser wrote:well if using eg .4 you would have to go to a command prompt and start EG in debugging mode. little inconvenient

Yes, well, not too bad, but I see the point... I'm using 0.5 so I don't have that problem
kgschlosser wrote:and to be honest i haven't looked for the location of the plugin exporter in .5 and I have not stumbled across it either in any of the drop down menus. don't know if it is hidden else where.

You can directly right-click on plugins in the plugin chooser - a very good place for the export functionality, if you ask me
kgschlosser wrote:this also appends the version to the file name. so tracking version changes among a single plugin is a little easier for the dev. and when you bean starts going (like mine) and ya can't remember what ya did and what version is in the egplugin file you won't have to open it and load the info.py to read the version. ya just have to gander at the file name. I don't know about you but my computer hates me because of the sheer number of things i have going on. I really need to add another 16 gig of memory to this thing. it starts having issues. so the less i have to have open the better.

haha :D
Well, unless your plugins are huge, I don't think 7zip, or what ever you use, will eat a lot of RAM.
Anyway I see the point and like that idea, would be something that could be integrated in the default export mechanism as well.

OK, since I use 0.5, I'll stick to the default export mechanism...
Sem;colon
Experienced User
 
Posts: 571
Joined: Sat Feb 18, 2012 10:51 am
Location: Germany

Re: External Export Plugin

Postby kgschlosser » Fri Dec 16, 2016 4:32 pm

it was a convince thing i did up because of EG 0.4 and because of the version number. those were really the only reasons why. I think i am going to add flake8 compliance checking to it. with the option to fix. but also header checking/addition as well. and maybe depreciated EG commands checking. could also toss in code compliance for a specific EG version.
it could also be used for creating docstrings in a standardized manner. with simple point and click things for variable types things like that.

Oh. i am going to add this one right now. GUID creation and addition YAY!!!

its a means to play with some ideas and maybe pass these ideas off to EG's github if they can be done successfully.
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
 
Posts: 1854
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA


Return to Coding Corner

Who is online

Users browsing this forum: No registered users and 2 guests