Last active
February 12, 2025 00:03
-
-
Save tildejustin/ae9e17fe361fc08e8545691b0fba52af to your computer and use it in GitHub Desktop.
Worldbopper but it doesn't make a log file every time
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# originally by Specnr | |
# edited to use terminal output | |
# parallelization stolen from jojoe | |
import glob | |
from concurrent import futures | |
import os | |
import shutil | |
INST_FOLDER = r"C:\Users\justi\AppData\Roaming\PrismLauncher\instances" | |
RECORDS_FOLDER = r"C:\Users\justi\speedrunigt\records" | |
print("Deleting worlds...") | |
with futures.ThreadPoolExecutor() as executor: | |
files = glob.glob(f'{INST_FOLDER}/*/*minecraft/saves/*') | |
for f in files: | |
if os.path.isdir(f) and ("New World" in f or "New Wurld" in f or "ma sin" in f or "Speedrun #" in f or "Practice Seed" in f or " attempt " in f or "mcsrranked " in f or "Benchmark Reset #" in f or "shareware" in f or "Demo_World" in f): | |
print("deleting " + f) | |
executor.submit(shutil.rmtree, f) | |
else: | |
print("skipping " + f) | |
print("deleting records") | |
files = glob.glob(f'{RECORDS_FOLDER}/*.json') | |
for f in files: | |
executor.submit(os.remove, f) | |
input("bopping completed, press enter to exit...") | |
executor.shutdown() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment