1

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:

  1. Download a CSV file of comments and their corresponding links from an SEDE query such as this. Name it "comments.csv".
  2. Download this python script in the same directory.
  3. Edit the script with your access token: replace the ###YOUR ACCESS TOKEN### text with your access token string.
  4. Install required packages using pip:

    pip install --user requests pandas
    
  5. 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:

  1. Currently only supports flagging comments on Stack Overflow. Future work will extend this to support all sites on the network.
  2. 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:

enter image description here

  • 3
    A bot abusing that flag on this site will draw repercussions. Suggest not flagging any such comment if (A) it is less than, say, 10-days old or (B) the "thanks" is a small part of an otherwise useful comment or (C) removal of the comment "confuses" the remaining text (unless other no-longer-useful comments are also flagged, such that the unflagged comments still make sense). – Brock Adams Jul 4 at 2:26

You must log in to answer this question.

Browse other questions tagged .