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)[0]
                if not htmlname.endswith(ext):
                    htmlname = '%s_%s' % (htmlname,ext)
                archname = '%s.html' % htmlname # fake the real nature
of the html file
                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?


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:

To search Galaxy mailing lists use the unified search at:

Reply via email to