Mcpack Converter Site
def browse(self): path = filedialog.askopenfilename(filetypes=[("MCPack files", "*.mcpack"), ("All files", "*.*")]) if not path: path = filedialog.askdirectory() if path: self.path_var.set(path)
def run(self, command): path = self.path_var.get() if not path: messagebox.showerror("Error", "Select a file or folder first") return # Call the CLI script script_dir = os.path.dirname(os.path.abspath(__file__)) script_path = os.path.join(script_dir, "mcpack_converter.py") cmd = [sys.executable, script_path, path, command] try: result = subprocess.run(cmd, capture_output=True, text=True) self.log.insert(tk.END, f"\n> {' '.join(cmd)}\n") self.log.insert(tk.END, result.stdout) if result.stderr: self.log.insert(tk.END, result.stderr) self.log.see(tk.END) except Exception as e: messagebox.showerror("Error", str(e)) if == " main ": root = tk.Tk() app = MCPackConverterGUI(root) root.mainloop() mcpack converter
if output_dir is None: output_dir = mcpack_path.stem + "_extracted" def browse(self): path = filedialog
args = parser.parse_args()

