Skip to content

Instantly share code, notes, and snippets.

@Areha11Fz
Created February 15, 2022 19:25
Show Gist options
  • Save Areha11Fz/992127abe2c339c178fcee1da5d5ff53 to your computer and use it in GitHub Desktop.
Save Areha11Fz/992127abe2c339c178fcee1da5d5ff53 to your computer and use it in GitHub Desktop.
import re
import os
from pathlib import Path
Path("out").mkdir(parents=True, exist_ok=True)
f = open("hdifffiles.txt", "r")
string = f.read()
dir = re.sub('{"remoteName": "', '', string)
dir = re.sub('"}', '', dir)
# print(dir)
for line in dir.split('\n'):
filename = os.path.basename(line)
# print(filename)
cmd = "hpatchz.exe" + " " + line + " " + line + ".hdiff " + "./out/" + filename
print(cmd)
os.system(cmd)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment