Headless chatbot that detects spam and posts links to it to chatrooms for quick deletion.
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci restore from the mess Dec 31, 2018
.github give up. GitHub's Insight section is flawed Sep 25, 2018
classes Update flake8 to 3.6.0, prettify config Dec 7, 2018
test make a nice link Jan 3, 2019
.codeclimate.yml Revert "Merge pull request #1347 from rjrudman/master" Dec 8, 2017
.gitattributes Update .gitattributes Nov 4, 2018
.gitignore minimal plugin API Jan 13, 2019
.pullapprove.yml Fix PA again Sep 13, 2018
.travis.yml travis pytest, #2587 Jan 9, 2019
Dockerfile Document plain except:'s, #1168 Aug 6, 2018
InspectionReference.txt Remove unnecessary inspect suppression, reference the inspections. Jul 26, 2017
LICENSE-APACHE no one noticed this until September? Sep 5, 2018
LICENSE-MIT no one noticed this until September? Sep 5, 2018
README.md Link to wiki setup documentation; formatting Jan 15, 2019
apigetpost.py Use requests' params keyword argument instead Oct 24, 2018
bad_keywords.txt Auto blacklist of `testo(?:sterone)?\W?rush` by iBug Jan 19, 2019
blacklisted_numbers.txt Auto blacklist of `+1-844-802-7535` by tripleee --autopull Nov 27, 2018
blacklisted_usernames.txt Auto unblacklist of `(?-i:-^Harry Stylesheet$)` by tripleee Jan 21, 2019
blacklisted_websites.txt Auto blacklist of `downloadbyme\.com` by Glorfindel Jan 19, 2019
blacklists.py !!/bisect <text> Dec 29, 2018
bodyfetcher.py wheeeee Nov 1, 2018
chatcommands.py cleanup temporary changes Jan 20, 2019
chatcommunicate.py don't post comments with `sd shorthand command` Jan 20, 2019
chatexchange_extension.py Invalidate content_source on edit hack Jul 16, 2018
codecov.yml Require coverage to change before posting comment Apr 1, 2017
config.ci update README to https Oct 7, 2018
config.sample Make time format in log messages customizable Sep 4, 2018
datahandling.py namedtuple is sweet Dec 22, 2018
deletionwatcher.py Use requests' params keyword argument instead Oct 24, 2018
excepthook.py fix mysterious normal exit Jan 9, 2019
findspam.py fix URL_REGEX DoS vulnerability, fix TAG_REGEX not matching </p> Jan 20, 2019
flovis.py Modify order of except clauses Oct 24, 2018
gitmanager.py rename `on_master` to `on_branch` Jan 2, 2019
globalvars.py rename `on_master` to `on_branch` Jan 2, 2019
helpers.py tb.print_stack is useless Jan 5, 2019
install_dependencies.sh Use `python3` instead of `python` Jun 14, 2018
metasmoke.py tb.print_stack is useless Jan 5, 2019
nocrash.py print None if no exit information Jan 19, 2019
parsing.py fix a potential bug Jan 14, 2019
queue_timings.py shebang for executable scripts Sep 7, 2018
requirements.txt travis pytest, #2587 Jan 9, 2019
rooms.yml +Michael Dodd to CHQ Jan 2, 2019
setup.sh use install_dependencies Mar 14, 2018
socketscience.py Decode in the right place Nov 30, 2018
spamhandling.py Don't replace post link, create another lookup dictionary instead Oct 26, 2018
tasks.py Various fixes Feb 17, 2018
tox.ini minimal plugin API Jan 13, 2019
tox_classes.ini Update flake8 to 3.6.0, prettify config Dec 7, 2018
tox_tests.ini Update pep8-naming to 0.7.0 Dec 7, 2018
user_requirements.txt post_data.as_dict Jul 13, 2018
users.yml Sort users.yml Dec 12, 2018
util.py handle message toooooo long Jan 3, 2019
watched_keywords.txt Auto watch of `hspads\.com` by Nisse Engström Jan 21, 2019
watched_numbers.txt Auto watch of `+1-(833)-222-2937` by tripleee Jan 21, 2019
ws.py minimal plugin API Jan 13, 2019

README.md

SmokeDetector

Build Status Circle CI Coverage Status Open issues Open PRs

Headless chatbot that detects spam and posts it to chatrooms. Uses ChatExchange, takes questions from the Stack Exchange realtime tab, and accesses answers via the Stack Exchange API.

Example chat post:

Example chat post

Documentation

User documentation is in the wiki.

Detailed documentation for setting up and running SmokeDetector is in the wiki.

Basic setup

To set up, please use

git clone https://github.com/Charcoal-SE/SmokeDetector.git
cd SmokeDetector
git config user.email "smokey@erwaysoftware.com"
git config user.name "SmokeDetector"
git checkout deploy
sudo pip3 install -r requirements.txt --upgrade
pip3 install --user -r user_requirements.txt --upgrade

Next, copy config.sample to a new file called config, and edit the values required.

To run, use python3 nocrash.py (preferably in a daemon-able mode, like a screen session.) You can also use python3 ws.py, but then SmokeDetector will be shut down after 6 hours; when running from nocrash.py, it will be restarted. (This is to be sure that closed websockets, if any, are reopened.)

Requirements

SmokeDetector only supports Stack Exchange logins, and runs on Python 3.5 or higher, for now.

License

Licensed under either of

at your option.

Contribution Licensing

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.