| 121 | self.extract() |
| 122 | |
| 123 | def extract(self): |
| 124 | dest = self.get_plugin_folder() |
| 125 | with zipfile.ZipFile(self.get_local_destination(), "r") as z: |
| 126 | z.extractall(dest) |
| 127 | |
| 128 | github_folder = os.path.join(dest, '{}-{}'.format(self.plugin_parts['repo'], self.plugin_parts['sha'])) |
| 129 | new_folder = os.path.join(dest, '{}'.format(self.plugin_parts['repo'])) |
| 130 | shutil.move(github_folder, new_folder) |
| 131 | |
| 132 | with open(os.path.join(dest, '.sha'), 'w') as file: |
| 133 | file.write(self.plugin_parts['sha']) |
| 134 | |
| 135 | os.remove(self.get_local_destination()) |
| 136 | |
| 137 | def download(self): |
| 138 | url = self.get_github_download_url() |