[Debichem-devel] some improvements to the vmd packaging
Johannes Schauer
j.schauer at email.de
Thu Sep 5 13:49:35 UTC 2013
Hi,
Quoting Michael Banck (2013-08-31 23:23:32)
> Would you like to join the Debichem team and just commit your changes to our
> repository? If so, do you have an Alioth account already?
I have an alioth account but sadly I dont think I have enough spare time for a
long term commitment to debichem :(
But since we use vmd at my uni, you might see another mail by me with some more
fixes. I plan to write to the vmd list next - maybe some of my changes can be
applied upstream.
I will mention the free-ness issue too but as I do not have high hopes, I tried
to write a script which automates the login and download process:
--%<----------------------------------------------------
import mechanize
from lxml import etree
import sys
from subprocess import call
br = mechanize.Browser()
br.open("http://www.ks.uiuc.edu/Development/Download/download.cgi?UserID=&AccessCode=&ArchiveID=1190")
def foo(n):
try: return "UserName" in n and "Password" in n
except: return False
br.select_form(predicate=foo)
br["UserName"] = sys.argv[1]
br["Password"] = sys.argv[2]
resp = br.submit()
def foo(n):
try: return "LicenseText" in n
except: return False
br.select_form(predicate=foo)
print br["LicenseText"]
def foo(n):
try: return "AgreeToLicense" in n
except: return False
br.select_form(predicate=foo)
resp = br.submit("AgreeToLicense")
tree = etree.fromstring(resp.read(), etree.HTMLParser())
call(["wget", "http://www.ks.uiuc.edu"+tree.xpath("//meta[@http-equiv='refresh']/@content")[0][6:]])
-->%----------------------------------------------------
Strangely enough, the final download does not require any cookie or login info
anymore. Even a directory listing is allowed. Not writing the direct url here
as I have no clue about legal trouble but by running above script with a valid
username and password you can easily figure it out yourself.
Maybe such a script allows to make a package which at least automates the
downloading an package building part. This would circumvent the
un-redistributibility (does that word exist? :D) of vmd. Probably similar to
the adobe flash situation.
cheers, josch
More information about the Debichem-devel
mailing list