Headless chatbot that detects spam and posts links to it to chatrooms for quick deletion.
Python Shell
Latest commit aee3890 Mar 24, 2017 @ArtOfCode- ArtOfCode- committed on GitHub Flake wants whitespace
Permalink
Failed to load latest commit information.
ChatExchange @ dafeb8d Update ChatExchange to latest Mar 8, 2017
classes Multiple fixes and changes Mar 18, 2017
test Fix issues based on Inspections Mar 14, 2017
.gitignore Multiple fixes and changes Mar 18, 2017
.gitmodules Revert "Switch to Art's patch branch until merged upstream" Mar 8, 2017
.travis.yml Fixed stupidity Mar 21, 2017
Dockerfile Updated Dockerfile to add Git Feb 23, 2017
LICENSE-APACHE Should probably be consistent Feb 18, 2017
LICENSE-MIT More consistency Feb 18, 2017
README.md Update README.md Mar 21, 2017
RevertedMode.md Updated RevertedMode.md Jan 27, 2015
StandbyMode.md grammar Feb 6, 2017
apigetpost.py Configure __setitem__/__getitem__ for PostData, make as_dict property… Mar 14, 2017
bad_keywords.txt Auto blacklist of best\Wbrite\Wsmile by tripleee --autopull Mar 24, 2017
blacklisted_usernames.txt Auto blacklist of radlelgl by tripleee --autopull Mar 22, 2017
blacklisted_websites.txt Add click2trial.com - been used in 7 spam posts Mar 23, 2017
bodyfetcher.py Multiple fixes and changes Mar 18, 2017
chatcommands.py Allow joke !!/alives in CHQ Mar 20, 2017
chatcommunicate.py Fix issues based on Inspections Mar 14, 2017
chatexchange_extension.py Add no-chat command line option Mar 17, 2017
circle.yml Post object: Start using it (breaks: testsuite) Mar 14, 2017
cloud-init Syntax to auto-launch Smokey after setup Feb 5, 2017
config.ci Fix CI errors due to config file missing Oct 21, 2016
config.sample better config example Oct 21, 2016
datahandling.py Revert "Revert a lot of things" Mar 18, 2017
deletionwatcher.py Revert debugging for deletion issue Mar 7, 2017
excepthook.py Optimize out a variable. Feb 3, 2017
findspam.py +andro to pattern product name Mar 24, 2017
fix_pickles.py Executable bit on fix_pickles Feb 15, 2017
gitmanager.py Use -c color.status=false in !!/gitstatus --autopull Mar 20, 2017
globalvars.py OCD Mode 101: Line up the comments so they're all in line with each o… Mar 19, 2017
helpers.py Merge Master changes into classes_refactor (#588) Mar 16, 2017
metasmoke.py Flake8 - Line length issue Mar 14, 2017
nocrash.py Add no-chat command line option Mar 17, 2017
nocrash.sh Missing newline at end of file. Feb 6, 2017
parsing.py Fix issues based on Inspections Mar 14, 2017
queue_timings.py Flake wants whitespace Mar 24, 2017
requirements.txt This implements username like website; adjusts method calls to accept… Feb 22, 2017
setup.sh Bash inspections complained about missing shebang line. Jan 18, 2017
spamhandling.py Use local post_url instead of post.post_url Mar 16, 2017
tox.ini Post object: Start using it (breaks: testsuite) Mar 14, 2017
tox_classes.ini Post object: Start using it (breaks: testsuite) Mar 14, 2017
tox_tests.ini Missing empty line at the end of the file. Jan 18, 2017
utcdate.py Add warning suppressions (IDE and some code checkers). Dec 28, 2016
ws.py Remove "Destroy Queue Pickles" from ws.py init. Mar 18, 2017

README.md

SmokeDetector

Build Status Circle CI codecov

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

User documentation is in the GitHub wiki.

To set up, use

git config --global user.email "you@example.com"
git config --global user.name "Your Name"

git clone https://github.com/Charcoal-SE/SmokeDetector.git
cd SmokeDetector
git submodule init
git submodule update
sudo pip install -r requirements.txt --upgrade

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

To run, use nocrash.py or python nocrash.py (preferably in a daemon-able mode, like a screen session.) You can also use python 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)

Note that SmokeDetector is written in Python 2, so you may have to explicity run python2 if Python 3 is the default version of Python on your distro.

You can run . ChatExchange/setp.sh to set local environment variables so that you don't have to log in every time.

SmokeDetector only supports Stack Exchange OpenIDs for now.

License

Licensed under either of

at your option.

Contribution

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.