they/she 🏳️‍🌈🏳️‍⚧️🌱 https://animalclock.org/uk/

  • 0 Posts
  • 6 Comments
Joined 1 year ago
cake
Cake day: June 7th, 2023

help-circle


  • I used https://github.com/ksurl/Shreddit

    Here’s a quick bash script in case you have multiple accounts and want to run the delete on a schedule. Run it under a dedicated service account or modify the script to use venv or pipenv.

    #!/usr/bin/env bash
    set -euo pipefail
    cd ~ || exit $?
    [[ "$PATH" =~ (^|:)'~/.local/bin'(:|$) ]] || export PATH="~/.local/bin:$PATH"
    command -v shreddit > /dev/null || python3 -m pip install --user --upgrade pip Shreddit@git+https://github.com/ksurl/Shreddit.git
    while read -r acct; do
      echo shreddit -u "$acct"
      shreddit -u "$acct"
    done < <( sed -E '/^\[/!d; s/\[|\]//g' praw.ini )