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
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?