Compare commits

...

6 commits

22 changed files with 72 additions and 4 deletions

View file

@ -229,8 +229,28 @@ Maintenance:
newrow=[instance,category,name,url,sensi,desc,'YES','100'] newrow=[instance,category,name,url,sensi,desc,'YES','100']
print_colors(f"[+] NEWROW= {newrow}") print_colors(f"[+] NEWROW= {newrow}")
# (rest is automatic: status, score, instance is = '' because it is your own instance) # (rest is automatic: status, score, instance is = '' because it is your own instance)
# TODO check if the entry doesnt already exist in verified.csv and in unverified.csv # delete existing entries in verified.csv
# if it doesnt exist, add it into unverified.csv vdf_same_url_filter = vdf["URL"] == url # check for same url
vdf_same_url_filter_count = vdf_same_url_filter.sum() # total url matches
if vdf_same_url_filter_count > 0:
print(f"Found {vdf_same_url_filter_count} row(s) with the same url in verified.csv")
for index, row in vdf[vdf_same_url_filter].iterrows():
print_colors(f"[+] ROW[{index}]= {list(row)}")
vdf = vdf[~vdf_same_url_filter].reset_index(drop=True) # keep only entries that do not match filter
print(f"Deleted {vdf_same_url_filter_count} row(s) with the same url in verified.csv")
if desc == '': # if the description is empty = it means that it goes in unverified.csv, so save modified verified.csv file now
vdf.to_csv(verifiedcsvfile, index=False)
# delete existing entries in unverified.csv
uvdf_same_url_filter = uvdf["URL"] == url # check for same url
uvdf_same_url_filter_count = uvdf_same_url_filter.sum() # total url matches
if uvdf_same_url_filter_count > 0:
print(f"Found {uvdf_same_url_filter_count} row(s) with the same url in unverified.csv")
for index, row in uvdf[uvdf_same_url_filter].iterrows():
print_colors(f"[+] ROW[{index}]= {list(row)}")
uvdf = uvdf[~uvdf_same_url_filter].reset_index(drop=True) # keep only entries that do not match filter
print(f"Deleted {uvdf_same_url_filter_count} row(s) with the same url in unverified.csv")
if desc != '': # if the description isnt empty = it means that it goes in verified.csv, so save modified unverified.csv file now
uvdf.to_csv(unverifiedcsvfile, index=False)
if desc == '': # if the description is empty = it means that it goes in unverified.csv if desc == '': # if the description is empty = it means that it goes in unverified.csv
print("Adding new row in unverified.csv since description is empty") print("Adding new row in unverified.csv since description is empty")
uvdf.loc[-1] = newrow # adding a row uvdf.loc[-1] = newrow # adding a row
@ -1438,3 +1458,4 @@ Maintenance:
if __name__ == '__main__': if __name__ == '__main__':
main() main()

View file

@ -173,11 +173,53 @@ if (($handle = fopen($csvfile, "r")) !== FALSE) {
if (strtolower($oldcatname) != strtolower($data[1])){ if (strtolower($oldcatname) != strtolower($data[1])){
if( str_contains(strtolower($data[1]),'monero' )){ if( str_contains(strtolower($data[1]),'monero' )){
echo '<a class="xmr" href="index.php?query=' . $data[1] . '">' . $data[1] . '</a> | '; // display the category as its the first row with this new category echo '<img class="caticon" src="img/monero.png">' . '<a class="xmr" href="index.php?query=' . $data[1] . '">' . $data[1] . '</a> | '; // display the category as its the first row with this new category
$oldcatname=$data[1]; $oldcatname=$data[1];
}elseif( str_contains(strtolower($data[1]),'simplex' )){ }elseif( str_contains(strtolower($data[1]),'simplex' )){
echo '<a class="sxc" href="index.php?query=' . $data[1] . '">' . $data[1] . '</a> | '; // display the category as its the first row with this new category echo '<img class="caticon" src="img/simplex.png">' . '<a class="sxc" href="index.php?query=' . $data[1] . '">' . $data[1] . '</a> | '; // display the category as its the first row with this new category
$oldcatname=$data[1]; $oldcatname=$data[1];
}elseif (str_contains(strtolower($data[1]), 'sms')){
echo '<img class="caticon" src="img/sms.ico">' . '<a href="index.php?query=' . $data[1] . '">' . $data[1] . '</a> | '; // display the category as its the first row with this new category
$oldcatname=$data[1];
}elseif (str_contains(strtolower($data[1]), 'games')){
echo '<img class="caticon" src="img/games.ico">' . '<a href="index.php?query=' . $data[1] . '">' . $data[1] . '</a> | '; // display the category as its the first row with this new category
$oldcatname=$data[1];
}elseif (str_contains(strtolower($data[1]), 'vps')){
echo '<img class="caticon" src="img/linux.ico" >' . '<a href="index.php?query=' . $data[1] . '">' . $data[1] . '</a> | '; // display the category as its the first row with this new category
$oldcatname=$data[1];
}elseif (str_contains(strtolower($data[1]), 'torproject')){
echo '<img class="caticon" src="img/tor_browser.ico">' . '<a href="index.php?query=' . $data[1] . '">' . $data[1] . '</a> | ';
$oldcatname=$data[1];
}elseif (str_contains(strtolower($data[1]), 'privacy front-ends')){
echo '<img class="caticon" src="img/opensource.ico">' . '<a href="index.php?query=' . $data[1] . '">' . $data[1] . '</a> | ';
$oldcatname=$data[1];
}elseif (str_contains(strtolower($data[1]), 'vpns')){
echo '<img class="caticon" src="img/openvpn.ico">' . '<a href="index.php?query=' . $data[1] . '">' . $data[1] . '</a> | ';
$oldcatname=$data[1];
}elseif (str_contains(strtolower($data[1]), 'fediverse')){
echo '<img class="caticon" src="img/xmpp.ico">' . '<a href="index.php?query=' . $data[1] . '">' . $data[1] . '</a> | ';
$oldcatname=$data[1];
}elseif (str_contains(strtolower($data[1]), 'torrents')){
echo '<img class="caticon" src="img/torrents.ico">' . '<a href="index.php?query=' . $data[1] . '">' . $data[1] . '</a> | ';
$oldcatname=$data[1];
}elseif (str_contains(strtolower($data[1]), 'forums')){
echo '<img class="caticon" src="img/dread.png">' . '<a href="index.php?query=' . $data[1] . '">' . $data[1] . '</a> | ';
$oldcatname=$data[1];
}elseif (str_contains(strtolower($data[1]), 'mail')){
echo '<img class="caticon" src="img/clawsmail.png">' . '<a href="index.php?query=' . $data[1] . '">' . $data[1] . '</a> | ';
$oldcatname=$data[1];
}elseif (str_contains(strtolower($data[1]), 'radio')){
echo '<img class="caticon" src="img/radio.ico">' . '<a href="index.php?query=' . $data[1] . '">' . $data[1] . '</a> | ';
$oldcatname=$data[1];
}elseif (str_contains(strtolower($data[1]), 'search engine')){
echo '<img class="caticon" src="img/searxng.svg">' . '<a href="index.php?query=' . $data[1] . '">' . $data[1] . '</a> | ';
$oldcatname=$data[1];
}elseif (str_contains(strtolower($data[1]), 'exchanges')){
echo '<img class="caticon" src="img/haveno.png">' . '<a href="index.php?query=' . $data[1] . '">' . $data[1] . '</a> | ';
$oldcatname=$data[1];
}else{ }else{
echo '<a href="index.php?query=' . $data[1] . '">' . $data[1] . '</a> | '; // display the category as its the first row with this new category echo '<a href="index.php?query=' . $data[1] . '">' . $data[1] . '</a> | '; // display the category as its the first row with this new category
$oldcatname=$data[1]; $oldcatname=$data[1];

BIN
www/img/clawsmail.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

BIN
www/img/dread.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
www/img/games.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

BIN
www/img/haveno.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

BIN
www/img/linux.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

BIN
www/img/monero.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
www/img/opensource.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

BIN
www/img/openvpn.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

BIN
www/img/radio.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

1
www/img/searxng.svg Normal file
View file

@ -0,0 +1 @@
<svg height="92mm" viewBox="0 0 92 92" width="92mm" xmlns="http://www.w3.org/2000/svg"><g transform="translate(-40.921303 -17.416526)"><g fill="none"><circle cx="75" cy="92" r="0" stroke="#000" stroke-width="12"/><circle cx="75.921" cy="53.903" r="30" stroke="#3050ff" stroke-width="10"/><path d="m67.514849 37.91524a18 18 0 0 1 21.051475 3.312407 18 18 0 0 1 3.137312 21.078282" stroke="#3050ff" stroke-width="5"/></g><path d="m3.706 122.09h18.846v39.963h-18.846z" fill="#3050ff" transform="matrix(.69170581 -.72217939 .72217939 .69170581 0 0)"/></g></svg>

After

Width:  |  Height:  |  Size: 557 B

BIN
www/img/simplex.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
www/img/sms.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

BIN
www/img/tor.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

BIN
www/img/tor_browser.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

BIN
www/img/torrents.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

BIN
www/img/xmpp.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

View file

@ -9,6 +9,10 @@
font-family: 'Source Code Pro', monospace; font-family: 'Source Code Pro', monospace;
} }
.caticon{
height: 13px;
}
.width-class{ .width-class{
width: 100%; width: 100%;
object-fit: contain; object-fit: contain;