All Projects → mgleon08 → slack_neuralyzer

mgleon08 / slack_neuralyzer

Licence: MIT license
Ruby gem for clean up messages and files on Slack.

Programming Languages

ruby
36898 projects - #4 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to slack neuralyzer

The-Ruby-Workshop
A New, Interactive Approach to Learning Ruby
Stars: ✭ 26 (-55.17%)
Mutual labels:  rubygems
facebook-cleaner
It is almost spring, so time for a pre spring cleaning. This time: taking care of your Facebook. This script can safe you a lot of time if you would try to do that by hand.
Stars: ✭ 52 (-10.34%)
Mutual labels:  cleaner
jetbrains-utility
Remove/Backup – settings & cli for macOS (OS X) – DataGrip, AppCode, CLion, Gogland, IntelliJ, PhpStorm, PyCharm, Rider, RubyMine, WebStorm
Stars: ✭ 62 (+6.9%)
Mutual labels:  cleaner
tss-rb
A Ruby implementation of Threshold Secret Sharing (Shamir) as defined in IETF Internet-Draft draft-mcgrew-tss-03.txt
Stars: ✭ 22 (-62.07%)
Mutual labels:  rubygems
vultr.rb
Ruby bindings for VULTR API v2.
Stars: ✭ 47 (-18.97%)
Mutual labels:  rubygems
rubysec.github.io
Current home of rubysec.com
Stars: ✭ 25 (-56.9%)
Mutual labels:  rubygems
vital
Design Framework
Stars: ✭ 53 (-8.62%)
Mutual labels:  rubygems
github-issues-notice
Notify labeled issues to Slack
Stars: ✭ 20 (-65.52%)
Mutual labels:  slack
VsCacheCleaner
🧹 Clear the Visual Studio solution cache, free up your disk space!
Stars: ✭ 69 (+18.97%)
Mutual labels:  cleaner
drunker
Distributed CLI runner on AWS CodeBuild
Stars: ✭ 22 (-62.07%)
Mutual labels:  rubygems
sxp.rb
A universal S-expression parser for Ruby.
Stars: ✭ 49 (-15.52%)
Mutual labels:  rubygems
harvesting
Ruby wrapper for the Harvest API v2
Stars: ✭ 24 (-58.62%)
Mutual labels:  rubygems
purei9 unofficial
This project includes a client/library to connect to Electrolux and AEG cleaner robots.
Stars: ✭ 21 (-63.79%)
Mutual labels:  cleaner
fcmpush
Firebase Cloud Messaging API wrapper for Ruby, suppot HTTP v1 API including access_token auto refresh feature.
Stars: ✭ 44 (-24.14%)
Mutual labels:  rubygems
awesome-rails-security
A curated list of security resources for a Ruby on Rails application
Stars: ✭ 36 (-37.93%)
Mutual labels:  rubygems
microformats-ruby
Ruby gem that parse HTML containing microformats/microformats2 and returns Ruby objects, a Ruby hash or a JSON hash
Stars: ✭ 89 (+53.45%)
Mutual labels:  rubygems
rails-mini-profiler
Performance profiling for Rails, made simple 🦔
Stars: ✭ 380 (+555.17%)
Mutual labels:  rubygems
captcha-generator
An NPM package to generate captcha images that can be used in Discord bots or various other projects
Stars: ✭ 45 (-22.41%)
Mutual labels:  slack
gemdiff
Find source repositories for ruby gems. Open, compare, and update outdated gem versions
Stars: ✭ 116 (+100%)
Mutual labels:  rubygems
sinator
Sinatra application generator
Stars: ✭ 19 (-67.24%)
Mutual labels:  rubygems

Slack Neuralyzer

Gem Version Build Status Coverage Status Code Climate security MIT licensed

Slack Neuralyzer is a ruby gem for bulk delete messages and files on Slack channels.

The easiest way to clean up messages and files on Slack.

Installation

$ gem install slack_neuralyzer

Slack token

general_test_token

Getting Started

Show all channel names

slack_neuralyzer -t <TOKEN> -s

All user direct:
  001. leon
  002. slackbot
  003. cleanerbot

All channels (public):
  001. general
  002. random

All groups (private):
  001. private_channel

All multiparty direct:
  001. mpdm-leon--cleanerbot-1
  002. mpdm-leon--slackbot-1

Delete message(s)

Rerun below command and use -e | --execute to actually delete the message(s).

  • Channel

-C | --channel -D | --direct -G | --group -M | --mpdirect

# Delete all user messages in general channel
slack_neuralyzer -t <TOKEN> -m -C general -u all

# Delete all user messages in leon direct channel
slack_neuralyzer -t <TOKEN> -m -D leon -u all

# Delete all user messages in private_channel groups channel
slack_neuralyzer -t <TOKEN> -m -G private_channel -u all

# Delete all user messages in mpdm-leon--cleanerbot-1 multiparty direct channel
# (can `use slack_neuralyzer -t <TOKEN> -s` to see mpdirect channle name)
slack_neuralyzer -t <TOKEN> -m -M mpdm-leon--cleanerbot-1 -u all
  • Specific user

-u | --user

# Delete leon messages in general channel
slack_neuralyzer -t <TOKEN> -m -C general -u leon

# if you want to specific all users, you can type 'all'
slack_neuralyzer -t <TOKEN> -m -C general -u all
  • Specific Bot

-b | --bot

# Delete bots messages in general channel
slack_neuralyzer -t <TOKEN> -m -C general -b cleanerbot

# if you want to specific all bots, you can type 'all' (not bot users)
slack_neuralyzer -t <TOKEN> -m -C general -b all
  • Delete message(s) between two dates

-A | --after -B | --before

# Delete all user messages in general channel at 20160101 to 20161212
slack_neuralyzer -t <TOKEN> -m -C general -u all -A 20160101 -B 20161212
  • Delete message(s) with specified text

-R | --regex

# Delete all user messages with hello string in general channel
slack_neuralyzer -t <TOKEN> -m -C general -u all -R hello

Delete file(s)

File types: all, spaces, snippets, images, gdocs, docs, zips, pdfs

Rerun below command and use -e | --execute to actually delete the message(s).

  • Channel

-C | --channel -D | --direct -G | --group -M | --mpdirect

# Delete all user upload all type file in general channel
slack_neuralyzer -t <TOKEN> -f all -C general -u all

# Delete leon upload all images file in leon direct channel
slack_neuralyzer -t <TOKEN> -f images -D leon -u leon

# Delete all user upload all pdfs file in private_channel groups channel
slack_neuralyzer -t <TOKEN> -f pdfs -G private_channel -u all

# Delete all user upload all zips file in mpdm-leon--cleanerbot-1 multiparty direct channel
# (can `use slack_neuralyzer -t <TOKEN> -s` to see mpdirect channle name)
slack_neuralyzer -t <TOKEN> -f zips -M mpdm-leon--cleanerbot-1 -u all
  • Specific user and file type

-u | --user -f | --file

# Delete leon upload images file in general channel
slack_neuralyzer -t <TOKEN> -f images -C general -u leon
  • Delete file between two dates

-A | --after -B | --before

# Delete all user upload all type file in general channel at 20160101 to 20161212
slack_neuralyzer -t <TOKEN> -f all -C general -u all -A 20160101 -B 20161212

Generate log file

-l | --log

# Generate a log file in the current directory in ./slack_neuralyzer/YYYY-MM-DDTHH:MM:SS
slack_neuralyzer -t <TOKEN> -m -C general -u all -A 20160101 -B 20161212 -l

Rate

-r | --rate

# Delay between API calls in seconds (default:0.05)
slack_neuralyzer -t <TOKEN> -m -C general -u all -r 0.01

Help

-h | --help

usage:
    slack_neuralyzer [options]
    See https://github.com/mgleon08/slack_neuralyzer for more information.

options:
    -t, --token TOKEN                Slack API token (https://api.slack.com/web)
    -s, --show                       Show all users, channels, groups and multiparty direct names
    -m, --message                    Specifies that the delete object is messages
    -f, --file TYPE                  Specifies that the delete object is files of a certain type (Type: all, spaces, snippets, images, gdocs, docs, zips, pdfs)
    -C, --channel CHANNEL            Public channel name (e.g., general, random)
    -D, --direct DIRECT              Direct messages channel name (e.g., leon)
    -G, --group GROUP                Private groups channel name
    -M, --mpdirect MPDIRECT          Multiparty direct messages channel name (e.g., mpdm-leon--bot-1 [--show option to see name])
    -u, --user USER                  Delete messages/files from the specific user (if you want to specific all users, you can type 'all')
    -b, --bot BOT                    Delete messages from the specific bot (not bot users, if you want to specific all bots, you can type 'all')
    -A, --after DATE                 Delete messages/files after than this time (YYYYMMDD)
    -B, --before DATE                Delete messages/files before than this time (YYYYMMDD)
    -R, --regex TEXT                 Delete messages with specified text (regular expression)
    -e, --execute                    Execute the delete task
    -l, --log                        Generate a log file in the current directory
    -r, --rate RATE                  Delay between API calls in seconds (default:0.1)
    -v, --version                    Show the SlackNeuralyzer version
    -h, --help                       Show this message

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/mgleon08/slack_neuralyzer/pulls

Copyright & License

  • Copyright (c) 2016 Leon Ji. See LICENSE.txt for further details.
  • The gem is available as open source under the terms of the MIT License.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].