Source code for gdeps.sevenzip

#!python3

# Copyright 2007-2017 Gemr. All Rights Reserved.
# Licensed to MIT see LICENSE.txt

import gdeps as GDeps

__author__ = 'Suryavarman (http://sourceforge.net/u/suryavarman/profile/)'


[docs]class SevenZip(GDeps.Archive): def __init__(self, inConfigFile, inFolderPath, inLogFileDirectory, inArchiveUrl, inSectionName="7zip", inExePath=r"C:\\Program Files\\7-Zip\\7z.exe"): """ """ GDeps.Archive.__init__(self, inConfigFile, inFolderPath, inLogFileDirectory, inArchiveUrl, inSectionName, inExePath) self.m_ErrorRegexp = r"(.*Error:.*)"
[docs] def extract(self): """ .. note:: https://sevenzip.osdn.jp/chm/cmdline/ https://sevenzip.osdn.jp/chm/cmdline/commands/extract.htm """ aReport = GDeps.MacroReporting() aCommand = self.getCMDExePath() a7ZipCommand = ' x' aCommand += a7ZipCommand + ' "' + self.m_ArchiveFileName + '" -o"' + self.getExtractDir() + '" -y' self.callWithLogFile(aCommand, "7zip-extract", aReport, self) return aReport