Skip to content

Web scraper and push notifier for new messages on the Prohardver! forums (www.prohardver.hu). Use the original repo instead of mine: https://github.com/vzsg/prohardver-push-notifier

Notifications You must be signed in to change notification settings

yitsushi/prohardver-push-notifier

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

prohardver-push-notifier (PH!usher)

Minimal web scraper and push notifier for new messages on the Prohardver! forums (www.prohardver.hu).

How to use:

  1. Install git and Node.js on your target system.
  2. Clone this repository.
  3. Run 'npm install' to install dependencies.
  4. Copy config.example.js to config.js (or try to run the application)
  5. Set your Prohardver! and PushBullet credentials in config.js.
  6. (Optional) Configute optional parameters, like message format, polling interval and PH! flavor (subsite).
  7. Run with node index.js or forever.

Configuration File:

var Configuration = {
    EnabledSites: [
        {
            'name': 'prohardver',
            'username': 'Your Prohardver username',   // important!
            'password': 'Your Prohardver password',   // important!
            'checkInterval': 10,                      // in minutes
            'format': 'list',                         // count, list or urls
            'subsite': 'prohardver',                  // PH subsite to use in URLs
            'mobile': false,                          // true if you want mobile-friendly URLs
            'notifyTo': 'all'                         // replace with a single or an array of device idens for selective sending
        }
    ],
    PushBulletApiKey: 'Your PushBullet API key'       // !!! Fill it
};

Example:

> git clone https://github.com/vzsg/prohardver-push-notifier.git
> cd prohardver-push-notifier
> npm install
> cp config.example.js config.js

Edit `config.js`.

> node index.js

Hungarian FAQ for beginners (GYIK):

Csendes indítás Node.js forever:

Telepíteni kell a forever csomagot:

> $ npm install forever

Indítsd el:

> $ forever start index.js

Csendes indítás init.d script segítségével:

Írd át ezt a scriptet: http://goo.gl/Eg7Ebc így:

NODE_EXEC= /opt/node/bin/node  // node bináris útvonala, "which node" megmondja hol van
NODE_ENV= "production"          // kihagyható
NODE_APP='index.js'
PID_FILE=$APP_DIR/pid/app.pid
LOG_FILE=$APP_DIR/log/app.log
APP_DIR='<phusher_könyvtárához_teljes_útvonal>'
CONFIG_DIR=$APP_DIR

Mentsd el az /etc/init.d/<script_neve> helyre root joggal, majd:

> $ sudo update-rc.d <script_neve> defaults

Lépj be az index.js könyvtárába, és hozd létre a szükséges log fájlokat:

$ mkdir /pid
$ mkdir /log
$ nano /pid/app.pid
$ nano /log/app.log

Ezután indíthatod:

$ sudo /etc/init.d/<script_neve> <stop|start|restart|status>

Ha nem akarod, hogy reboot után a géppel induljon, akkor:

$ sudo update-rc.d -f <script_neve> remove

About

Web scraper and push notifier for new messages on the Prohardver! forums (www.prohardver.hu). Use the original repo instead of mine: https://github.com/vzsg/prohardver-push-notifier

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%