Overview
Forum
Mango
iMango
Papaya
Multi-image Analysis GUI
Board Index
Register
Login
Logout
Settings

how to publish the plugin written in Script Manager

User-submitted plugins.

Moderator: Michael Martinez

how to publish the plugin written in Script Manager

Postby emergency_rose » Mon Apr 03, 2017 6:00 pm

I've developed a plugin written in jython using Mango Script Manager, now I want to publish this plugin so that people can use it, but do I simply offer the script so that people can download and import, or I should compress it to a .jar file?
Ps. there are also other external packages for this plugin.
emergency_rose
 
Posts: 3
Joined: Mon Apr 03, 2017 4:50 pm

Re: how to publish the plugin written in Script Manager

Postby admin » Tue Apr 04, 2017 4:43 pm

Right now there isn't a way to import a script as a JAR, so I think you would just need to publish the script text or a compressed file with all the components and perhaps a README. You are welcome to publish it here.

I'd be very interested to see how you incorporated external packages. A number of people have asked about this in the past. It would be nice to be able to point to your example if it comes up again.
admin
Site Admin
 
Posts: 54
Joined: Fri Jul 06, 2007 8:18 am
Location: Research Imaging Center

Re: how to publish the plugin written in Script Manager

Postby emergency_rose » Fri Apr 07, 2017 4:12 pm

Thank you! I'm not sure if you are asking how to import external package for jython in script manager. If so, I can post my method.

All the external package that can be used for jython should be .jar format. Then just use sys.path.append to add the package path. After that, you can import the class as in python. For example:

Code: Select all
import sys
sys.path.append('.....path...../jnumeric-2.5.1_ra0.1.jar'')
import Numeric as np


What should be pointed out is that if the class you want to import is not directly under the .jar file(as you can check after opening the .jar package), you should add the folder that contain the class to the path, too. You can either try import package.subfolder.class, or use sys.addpackage. Actually I can't remember clearly, but this way should work.

In linux system, I would like to offer the whole software package which includes both the mango software and my plugin, since the bash script needs to be changed. Also, in this way, people can directly use the plugin without additional operation except for the importing.

In OS X system, I haven't found an appropriate way to pack my plugin into the pkg file (although I think it should not be so difficult, I just need more time). But I can change the plist file then repack it to installable pkg.

Hope it will help.
emergency_rose
 
Posts: 3
Joined: Mon Apr 03, 2017 4:50 pm


Return to Plugins

Who is online

Users browsing this forum: No registered users and 1 guest