This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
mastodon_spam_scanner [2023/02/09 03:19] admin |
mastodon_spam_scanner [2023/02/09 03:27] admin |
||
---|---|---|---|
Line 39: | Line 39: | ||
I can then search for these in the moderation interface and review them. | I can then search for these in the moderation interface and review them. | ||
- | The php code to generate the scores: | + | The php code to generate the scores (remember to create a cache directory with ''mkdir cache''): |
<code php scan_for_spammers.php> | <code php scan_for_spammers.php> | ||
Line 79: | Line 79: | ||
} | } | ||
$percent_complete = number_format(($progress/$total)*100,1); | $percent_complete = number_format(($progress/$total)*100,1); | ||
- | $moderation_link = $mastodon_host."/admin/accounts?origin=local&username=".$username; | + | $moderation_link = "<a href='$mastodon_host/admin/accounts?origin=local&username=".$username."'>mod link</a><br />"; |
echo $score."\t$username\t$moderation_link\n"; | echo $score."\t$username\t$moderation_link\n"; | ||
// this outputs a progress indicator to stderr | // this outputs a progress indicator to stderr | ||
Line 91: | Line 91: | ||
?> | ?> | ||
+ | </code> | ||
+ | |||
+ | I added a moderation link to the CSV output so I can just open that file in a browser with this for example: | ||
+ | <code bash> | ||
+ | php scan_for_spammers.php | grep -E "^4" > output.html | ||
</code> | </code> | ||
Back to the [[Mastodon]] page. | Back to the [[Mastodon]] page. |