mirror of https://gitlab.com/bashrc2/epicyon
Update ai cwlist from ublock origin
parent
6c3ebac1c6
commit
8931da1a1f
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,30 @@
|
|||
#!/bin/bash
|
||||
|
||||
wget https://raw.githubusercontent.com/laylavish/uBlockOrigin-HUGE-AI-Blocklist/refs/heads/main/noai_hosts.txt
|
||||
if [ ! -f noai_hosts.txt ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
TEMPFILENAME=noai_hosts.txt.tmp
|
||||
CW_FILENAME=cwlists/ai_generated.json
|
||||
grep "0.0.0.0" noai_hosts.txt | awk -F ' ' '{print $2}' > $TEMPFILENAME
|
||||
|
||||
{ echo "{";
|
||||
echo " \"name\": \"AI Generated Content\",";
|
||||
echo " \"warning\": \"AI Generated Content\",";
|
||||
echo " \"description\": \"Typically images generated by 'AI' generative models\",";
|
||||
echo " \"words\": [],";
|
||||
echo " \"hashtags\": [],";
|
||||
echo " \"domains\": ["; } > $CW_FILENAME
|
||||
|
||||
while IFS= read -r line
|
||||
do
|
||||
linestr=$(echo "$line" | sed 's/\r$//')
|
||||
linestr2=" \"${linestr}\","
|
||||
echo "$linestr2" >> $CW_FILENAME
|
||||
done < $TEMPFILENAME
|
||||
|
||||
{ echo " ]";
|
||||
echo "}"; } >> $CW_FILENAME
|
||||
rm $TEMPFILENAME
|
||||
rm noai_hosts.txt
|
Loading…
Reference in New Issue