1
0
mirror of https://github.com/minoplhy/filters-maker.git synced 2024-12-22 18:18:13 +00:00

remove duplicate defi

This commit is contained in:
Kale 2021-08-03 05:04:59 -07:00
parent b93d4bd363
commit 3aa7d1a371
No known key found for this signature in database
GPG Key ID: F8A6CE83F1274467

View File

@ -1,3 +1,4 @@
import crawler
def add(incoming,input):
with open(incoming, 'r') as f:
@ -8,7 +9,7 @@ def add(incoming,input):
lines = set(f.readlines())
with open(incoming, 'w') as f:
f.writelines(set(lines))
sort(incoming)
crawler.sort(incoming)
def add_file(incoming,excluded_in):
data= ""
@ -24,11 +25,4 @@ def add_file(incoming,excluded_in):
lines = set(f.readlines())
with open(incoming, 'w') as f:
f.writelines(set(lines))
sort(incoming)
def sort(incoming):
with open(incoming, 'r') as f:
lines = sorted(f.readlines())
with open(incoming, 'w') as f:
for line in lines:
f.write(line)
crawler.sort(incoming)