test removing
This commit is contained in:
parent
e91b76a01c
commit
8f022dbe48
@ -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/"],
|
||||
|
Loading…
Reference in New Issue
Block a user