Releasing a package?

ixokai
Posts: 63
Joined: Fri Dec 25, 2009 7:43 am

Releasing a package?

Post by ixokai »

I don't know about all of you, but I'm developing in an active profile where I load a lot of stuff into it. If I'm going to release code, I don't really want to export things one at a time, nor export everything at once and hand-edit the file.

This tool is a rough-draft that may help you if you're in a similar boat. It requires Python 2.5+ to be installed, and I don't guarantee it'll work on Windows yet, but who knows.

The syntax is:

Code: Select all

python mudlet-release.py -p Lusternia -o whatever.xml "Lusternia Fancy GUI" "Mantis"
The -p argument is the name of the profile... if its got a space, be sure to surround it in double-quotes. -o is the file you want to save the profile to.

The remaining arguments are names of top-level Groups which you want to allow exporting of. If you're organized, you probably use the same top-level group in each section, so you can include that here. Any spaces in the name? Just wrap the name in double quotes.

This will go into the mudlet profile, grab the latest file, and then butcher it. It'll remove the HostPackage, and then go to each type of data (Trigger, alias, script, etc), and the first thing it'll do is butcher any top-level items in that package. Then, it'll go and kill any groups/folders which are /not/ in your list of allowable packages above.

(Rename the file to mudlet-release.py)

Bug reports here or on #mudlet. This is experimental at this point.

You can get it at: http://code.google.com/p/mudlet-packages/downloads/list

ixokai
Posts: 63
Joined: Fri Dec 25, 2009 7:43 am

Re: Releasing a package?

Post by ixokai »

BTW, this appears to "just work" on Windows. You'll simply need to install Python 2.5+, since you're not fortunate (like nearly all linux and mac folks) to have Python pre-installed on your system.

The syntax is all the same.

ixokai
Posts: 63
Joined: Fri Dec 25, 2009 7:43 am

Re: Releasing a package?

Post by ixokai »

For anyone who downloaded this before, re-download it. The existing one wasn't parsing the dates properly (it was assuming MM-DD-YYYY not DD-MM-YYYY) so may not pick the right 'current' profile and wouldn't work at all for any day over 12 :)

ixokai
Posts: 63
Joined: Fri Dec 25, 2009 7:43 am

Re: Releasing a package?

Post by ixokai »

FYI, the original release didn't work quite right, and the new one I put up on the above site has a dependency besides Python that you have to install for it to work. Fortunately, that's easy.

After you install Python, download http://peak.telecommunity.com/dist/ez_setup.py to where ever, then run 'python ez_setup.py'. If you're not on windows, you'll wanna sudo that.

Then just do, "python -m easy_install lxml" with sudo again if appropriate.

Then it should all just work.

I plan on fixing it to be able to use the built-in etree eventually, but am Really Busy right now with the day job so don't have time to look into it yet.

User avatar
Vadi
Posts: 4878
Joined: Sat Mar 14, 2009 3:13 pm

Re: Releasing a package?

Post by Vadi »

Feature request - ignore certain folders and their children in the given root selection.

User avatar
Vadi
Posts: 4878
Joined: Sat Mar 14, 2009 3:13 pm

Re: Releasing a package?

Post by Vadi »

Usage: mudlet-release.py [options]

Options:
-h, --help show this help message and exit
-p PROFILE, --profile=PROFILE
Releaes from the named profile (required)
-o FILE, --output=FILE
Write XML to FILE (required)
The help file is a bit wrong, it doesn't say that after [options] you're supposed to use the groups you'd like to export.

ixokai
Posts: 63
Joined: Fri Dec 25, 2009 7:43 am

Re: Releasing a package?

Post by ixokai »

Vadi wrote:Feature request - ignore certain folders and their children in the given root selection.
I'm probably going to re-do this in terms of the crucible tools, so that you can set rulesets to determine what to extract and how to extract it, as the crucible tools already support doing so intelligently.

WIll that satisfy?

User avatar
Vadi
Posts: 4878
Joined: Sat Mar 14, 2009 3:13 pm

Re: Releasing a package?

Post by Vadi »

Probably

Iktomi
Posts: 46
Joined: Sat Sep 03, 2011 4:00 am

Re: Releasing a package?

Post by Iktomi »

Hey guys, I'm trying to use this but I'm getting the following error:

Traceback (most recent call last):
File "/home/zach/Desktop/mudlet-release.py", line 34, in <module>
from lxml import etree as ET
ImportError: No module named lxml


Any ideas?

User avatar
Rakon
Posts: 350
Joined: Tue Feb 16, 2010 7:41 pm
Contact:

Re: Releasing a package?

Post by Rakon »

Iktomi wrote:Hey guys, I'm trying to use this but I'm getting the following error:

Traceback (most recent call last):
File "/home/zach/Desktop/mudlet-release.py", line 34, in <module>
from lxml import etree as ET
ImportError: No module named lxml


Any ideas?

Fedora/Cent

Code: Select all

yum install python-lxml.i686
Ubuntu/Debian

Code: Select all

sudo apt-get install python-lxml

Post Reply