test removing
dl / lint (push) Successful in 2m15s Details
dl / docker (push) Successful in 1m2s Details

This commit is contained in:
Michel Roux 2023-10-05 15:21:14 +02:00
parent e91b76a01c
commit 8f022dbe48
1 changed files with 12 additions and 0 deletions

View File

@ -48,6 +48,13 @@ def remove(path, file):
os.remove(os.path.join(path, file))
def clean(path, database):
for file in os.listdir(path):
if os.path.isfile(os.path.join(path, file)) and file not in database:
# remove(path, file)
print(f"Hop {path}/{file}")
req_titles = requests.get(
"https://raw.githubusercontent.com/blawar/titledb/master/FR.fr.json"
)
@ -79,6 +86,11 @@ def get_title_shortid(name):
return id[0:-4] if id in titles else None
clean("nsz/base", bases)
clean("nsz/dlc", dlcs)
clean("nsz/updates", updates)
try:
subprocess.run(
["rclone", "sync", "-P", "-v", f"{remote}:nsz/homebrew", "nsz/homebrew/"],