Undocumented
Class Variable Formats Undocumented
Class Variable Ext_aliases Undocumented
Static Method parse_filename Given an filename return the basename (filename without the archive and compression extensions), archive format and compression method used.
Formats =
Undocumented
(type: List[str])
Ext_aliases =
Undocumented
(type: Dict)
@staticmethod
def parse_filename(filename):

Given an filename return the basename (filename without the archive and compression extensions), archive format and compression method used.

Parametersfilenamethe name of the file (type: string)
Returnstuple containing basename, archive format and compression method (type: tuple of str
>>> Archive.parse_filename("abc.tar.gz")
('abc', 'tar', 'gzip')
>>> Archive.parse_filename("abc.tar.bz2")
('abc', 'tar', 'bzip2')
>>> Archive.parse_filename("abc.def.tbz2")
('abc.def', 'tar', 'bzip2')
>>> Archive.parse_filename("abc.def.tar.xz")
('abc.def', 'tar', 'xz')
>>> Archive.parse_filename("abc.zip")
('abc', 'zip', None)
>>> Archive.parse_filename("abc.lzma")
('abc', None, 'lzma')
>>> Archive.parse_filename("abc.tar.foo")
('abc.tar.foo', None, None)
>>> Archive.parse_filename("abc")
('abc', None, None)
)
API Documentation for git-buildpackage, generated by pydoctor at 2021-02-01 08:15:22.