updated search feature 90% complete

This commit is contained in:
root 2025-01-15 09:00:18 +01:00
parent 55d07d6549
commit 5a844e25e0
5 changed files with 54 additions and 18 deletions

View file

@ -43,6 +43,7 @@ def main():
instancepath=rootpath+'www/participants/'+instance+'/'
csvfiles2check=['verified.csv','unverified.csv','webring-participants.csv']
csvfiles2sortcat=['verified.csv','unverified.csv']
#for csvfile in glob.glob("/srv/darknet-onion-webring/www/links/*.csv"):
for csvfilename in csvfiles2check:
@ -97,6 +98,9 @@ def main():
df.at[i,"Score"] = df.at[i,"Score"] - 1
df2 = df.sort_values(by=["Score"], ascending=False)
#sort by category if you are verified/unverified.csv
if csvfilename in csvfiles2sortcat:
df2 = df.sort_values(by=["Category"], ascending=False)
#print(df2)
df2.to_csv(csvfile, index=False)