Skip to content

lgbtq-technology/prune-slack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

prune-slack

A utility to remove files older than 7 days from a Slack instance

Running the script

python prune-slack [instance_name]

Where instance_name is (optionally) the Slack instance URL slug to access, for example python prune-slack acme-coders would remove your aged files from the instance at acme-coders.slack.com

Requirements

The script expects a Slack Legacy API token to be held in an environment variable SLACK_TOKEN.

Output

The script will output a message with the filename and ID of every file it tries to delete and the response JSON of the deletion attempt, for example:

Deleting file image.png... FEF6BTUKZ
{u'ok': True}
Deleting file example PN.jpg... FEFCFT3GD
{u'ok': True}
DONE!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages