Python blocklist generator + modified .gitignore + WARN string on spamwatch.js

Signed-off-by: lucmsilva651 <lucmsilva651@gmail.com>
This commit is contained in:
lucmsilva651 2024-08-31 21:20:49 -03:00
parent 8fe6dce44d
commit f0efeb63c4
No known key found for this signature in database
GPG key ID: D9B075FC6DC93985
5 changed files with 22 additions and 1 deletions

12
blocklist_gen/main.py Normal file
View file

@ -0,0 +1,12 @@
import os
from dotenv import load_dotenv
import spamwatch
load_dotenv("config.env")
client = spamwatch.Client(os.getenv('SW_KEY'))
bans = client.get_bans_min()
with open('sw_blocklist.txt', 'w') as file:
for ban in bans:
file.write(f'{ban}\n')

3
blocklist_gen/readme.txt Normal file
View file

@ -0,0 +1,3 @@
pip install -r requirements.txt
echo SW_KEY=APIKEY >> config.env # put your api key here
python main.py

View file

@ -0,0 +1,2 @@
python-dotenv
spamwatch