mirror of
https://github.com/appinfosapienza/so-un-bot.git
synced 2025-03-14 05:05:22 +01:00
new diffybot
This commit is contained in:
parent
06252781a6
commit
5bc039ca51
1 changed files with 12 additions and 1 deletions
13
diffybot.py
13
diffybot.py
|
@ -49,4 +49,15 @@ result = [values for key, values in rev_dict.items()
|
|||
if result:
|
||||
print("Duplicate questions:", str(result))
|
||||
else:
|
||||
print("There are no duplicates!")
|
||||
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