A utility to automatically flag "thank you" comments from SEDE queries like this one.
Are you looking to improve your flagging stats? Have a list of comments you are certain need to be flagged as "no longer needed", but do not want to go through the trouble of flagging each comment individually? Then this utility is for you. You will need python3 and an internet connection.
How to use:
- Download a CSV file of comments and their corresponding links from an SEDE query such as this. Name it "comments.csv".
- Download this python script in the same directory.
- Edit the script with your access token: replace the
###YOUR ACCESS TOKEN###
text with your access token string. Install required packages using
pip
:pip install --user requests pandas
Run the script! To automatically flag comments from the CSV file, run the command:
python3 comment_flagger.py N
Where N is a number between 1 and 100.
Future work:
- Currently only supports flagging comments on Stack Overflow. Future work will extend this to support all sites on the network.
- Future release will allow the CSV file to be passed as a command line argument (so the name does not have to be pre-set to "comments.csv").
NOTE: It is your responsibility to ensure that the comments this script is flagging are comments that must be flagged. Please go through your CSV file and remove any comments that you do not think would be removed by Community, or a moderator. Please remember that the main purpose of this script is not to find comments to flag, but to automatically flag comments that you know should be flagged. Additionally, please heed the warning in the SEDE query:
Not all of these comments are necessarily useless. Please check if the comment contains any useful information. If it does, do not flag it. Many if not all of these comments can be deleted from a single non-custom flag, so be careful.
Screenshots: