Page 1 of 2

Releasing a package?

Posted: Tue Jan 12, 2010 4:05 am
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

Re: Releasing a package?

Posted: Wed Jan 13, 2010 1:43 am
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.

Re: Releasing a package?

Posted: Wed Jan 13, 2010 9:03 pm
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 :)

Re: Releasing a package?

Posted: Tue Jan 19, 2010 6:50 pm
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.

Re: Releasing a package?

Posted: Sat Jan 30, 2010 7:56 pm
by Vadi
Feature request - ignore certain folders and their children in the given root selection.

Re: Releasing a package?

Posted: Sun Jan 31, 2010 3:41 pm
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.

Re: Releasing a package?

Posted: Wed Feb 03, 2010 5:30 am
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?

Re: Releasing a package?

Posted: Wed Feb 03, 2010 1:08 pm
by Vadi
Probably

Re: Releasing a package?

Posted: Thu Sep 22, 2011 5:57 pm
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?

Re: Releasing a package?

Posted: Thu Sep 22, 2011 8:30 pm
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