Skip to content

Commit

Permalink
Nixing archive support. That might happen in the future in a differen…
Browse files Browse the repository at this point in the history
…t package that depends on xphyle.
  • Loading branch information
Didion, John (NIH/NHGRI) [F] committed Nov 7, 2016
1 parent 8985143 commit cea2bd4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 40 deletions.
20 changes: 1 addition & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,22 +62,4 @@ See the [Documentation](http://xphyle.readthedocs.io/en/latest/?badge=latest) fo

# Roadmap

## 0.8

* Documentation

## 1.0

* Add support for archive formats
* tar, zip
* Recognize .tgz, .tbz2, and .tlz extensions

## Beyond

* Support other popular compression formats:
* LZW: the only decent library is python-lzw, and it doesn't provide an open method
* Snappy (via python-snappy): this is problematic since it depends on libsnappy, with no pure python fallback
* Support other popular archive formats
* 7zip archives: this is problematic as it depends on 7zip being installed, with no pure python fallback
* Consider using libarchive (if installed) via one of the several available python packages. Will have to do performance testing to determine whether this should be the first option or the second to try.
* Which others? arc, cab (windows-specific), dmg (mac-specific), iso9660, lzh, rar, xar, zz
The xphyle public API is now set. The 1.0 release is imminent, pending completion of the user documentation. Future releases will be mapped using [GitHub Projects](https://github.com/jdidion/xphyle/projects).
21 changes: 0 additions & 21 deletions xphyle/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,27 +313,6 @@ def uncompress_file(compressed_file, dest_file=None,
fmt = get_compression_format(compression)
return fmt.uncompress_file(compressed_file, dest_file, keep, use_system)

# def write_archive(path : 'str', contents, **kwargs):
# """Write entries to a compressed archive file.
#
# Args:
# path (str): Path of the archive file to write.
# contents (iterable): A dict or an iterable of (name, content) tuples.
# A content item can be a path to a readable file to be added
# to the archive.
# kwargs: Additional args to `open_archive_writer`.
# """
# if isinstance(contents, dict):
# contents = dict.items()
# with open_archive_writer(path, **kwargs) as c:
# for name, content in contents:
# if os.path.isfile(content):
# c.writefile(content, name)
# else:
# c.writestr(content, name)

# Some useful FileEventListeners

class CompressOnClose(FileEventListener):
"""Compress a file after it is closed."""
def execute(self, path, *args, **kwargs):
Expand Down

0 comments on commit cea2bd4

Please sign in to comment.