commit f2e2e1600a1e109cf84158761214bc75dc85b0cf parent a207b15776e370cd010dd6a41e877c84b62fbaec Author: Marcel <MTRNord@users.noreply.github.com> Date: Wed, 9 Nov 2016 22:21:42 +0100 Move README.md from gist to Repo Diffstat:
| M | README.md | | | 81 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- |
1 file changed, 79 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md @@ -1,2 +1,79 @@ -# intel-screenbot -An Ingress Intel Map Bot for Hangoutsbot +# Ingress Intel Screenbot + +Note: Most of the Code in `screencap.js` comes from [ingress-ice](https://github.com/nibogd/ingress-ice) which isn't made by me. So code Credits of it goes in the most parts to `nibogd`. I only modified it for the Bot. + +Requires: **PhantomJS** (installation instructions below) +Requires: **[hangoutsbot](https://github.com/hangoutsbot/hangoutsbot)** + +Get and post a screenshot of the Intel Map. + +## Install +To install the plugin you need to add the `__init__.py` and `screencap.js` into a subdirectory named `intel_screenbot` inside the plugin folder of your bot. Than you need to follow the Configuration part. + +## Configuration +For using the Intel Screenbot you need to add the following to the config.json: + +``` + "intel_screenbot": { + "SACSID": "YOUR SACSID", + "CSRF": "YOUR CSRF" + } +``` + +According to the official INSTALL Documention of the hangoutbot you will find the config.json in `/<username>/.local/share/hangupsbot/` +(NOTE! add an comma behind the last element of the config.json and add it befor the outer element closes) + +Also you need to add `intel_screenbot` to the plugins. + +## How to get SACSID and CSRF +You should look at the Documentation of [ingress-ice](https://github.com/nibogd/ingress-ice/wiki/Cookies-Authentication) + +## Admin Commands + +`/bot setintel <url>` +* Sets the default Intel URL of a particular hangout. + +`/bot clearintel` +* Clears the default screenshot URL of a particular hangout. + +## User Command + +`/bot intel [<url>]` +* Provide an arbitrary `<url>` to take a screenshot +* If no `<url>` is supplied, use the default screenshot URL (or reply with an error if no URL is set) + +## PhantomJS Installation + +### Debian-based distros (e.g. Ubuntu 14.04) + +`sudo apt-get install phantomjs` + +## Building PhantomJS from Source (Advanced) + +Note: It is not within the scope of this project to discuss and resolve build problems with + external libraries. + +**Install dependencies** + +On Debian-based distro (tested on Ubuntu 14.04), run: +``` +sudo apt-get install build-essential g++ flex bison gperf ruby perl \ + libsqlite3-dev libfontconfig1-dev libicu-dev libfreetype6 libssl-dev \ + libpng-dev libjpeg-dev +``` + +On Fedora-based distro (tested on CentOS 6), run: +``` +sudo yum -y install gcc gcc-c++ make flex bison gperf ruby \ + openssl-devel freetype-devel fontconfig-devel libicu-devel sqlite-devel \ + libpng-devel libjpeg-devel +``` + +**Install PhantomJS from source** + +``` +git clone git://github.com/ariya/phantomjs.git +cd phantomjs +git checkout 2.0 +./build.sh +```