On Mon, Nov 25, 2013 at 11:59 AM, Peter Cock <p.j.a.c...@googlemail.com> wrote: > Hello all, > > I would like to modify the default ZIP bundle behaviour > for composite datatypes, which currently insists on > creating an HTML "main" file. To do this I think the current > monolithic _archive_composite_dataset function needs > to be refactored in file lib/galaxy/datatypes/data.py > > I would like to move the section which currently names > and populates the HTML index file into a sub-method, > i.e. this chunk: > > path = data.file_name > fname = os.path.split(path)[-1] > efp = data.extra_files_path > htmlname = os.path.splitext(outfname) > if not htmlname.endswith(ext): > htmlname = '%s_%s' % (htmlname,ext) > archname = '%s.html' % htmlname # fake the real nature > of the html file > try: > archive.add(data.file_name,archname) > except IOError: > error = True > log.exception( "Unable to add composite parent %s > to temporary library download archive" % data.file_name) > msg = "Unable to create archive for download, > please report this error" > > Then by overriding this new method a subclass (custom > composite datatype) could for example set the filename > used inside the archive to be "index.html" or "index.htm" > or anything else like "README.txt" (doesn't have to be > HTML); alter the contents of the index file; or even not > include an index file in the archive. > > Would a pull request to do this be considered?
Hey Peter, Definitely. This sounds like a great change - I am looking forward to merging it! -John > > Thanks, > > Peter > ___________________________________________________________ > Please keep all replies on the list by using "reply all" > in your mail client. To manage your subscriptions to this > and other Galaxy lists, please use the interface at: > http://lists.bx.psu.edu/ > > To search Galaxy mailing lists use the unified search at: > http://galaxyproject.org/search/mailinglists/ ___________________________________________________________ Please keep all replies on the list by using "reply all" in your mail client. To manage your subscriptions to this and other Galaxy lists, please use the interface at: http://lists.bx.psu.edu/ To search Galaxy mailing lists use the unified search at: http://galaxyproject.org/search/mailinglists/