mirror of
https://github.com/appinfosapienza/so-un-bot.git
synced 2025-03-14 13:06:14 +01:00
new diffybot
This commit is contained in:
parent
06252781a6
commit
5bc039ca51
1 changed files with 12 additions and 1 deletions
11
diffybot.py
11
diffybot.py
|
@ -50,3 +50,14 @@ if result:
|
|||
print("Duplicate questions:", str(result))
|
||||
else:
|
||||
print("There are no duplicates!")
|
||||
exit()
|
||||
|
||||
for dup in result:
|
||||
#delete the duplicates
|
||||
ld = list(dup)
|
||||
for i in range(len(ld)):
|
||||
if i == 0:
|
||||
print("Keeping " + ld[i])
|
||||
continue
|
||||
print("Deleting", ld[i])
|
||||
os.rmdir(path + "/" + ld[i])
|
Loading…
Reference in a new issue