Skip to content

A bot for claim daily free learning ebooks from packtpub.

License

Notifications You must be signed in to change notification settings

pixelschnitzel/packtpubbot

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

packtpubbot

A bot for claim daily free learning ebooks from packtpub. It also notify you over Pushbullet. It's designed as cron job task on a Raspberry Pi.

Requirements

  • node.js, version 6.0.0+ (only tested on v6)

How to install

git clone https://github.com/mtuanp/packtpubbot.git

Configuration

The bot uses a json configuration file for providing login credentials. Add file names config.json in your working directory where you cloned. Example of config.json:

{
  "packtpub": {
    "email": "put your email here",
    "password": "put your password here"
  },
  "pushbullet": {
    "apiKey": "put your pushbullet api key here"
  }
}

How to use

After set up your config.json, you start the bot with following statements:

npm install # only on first run
npm start

Cron job

Find the absolute location of npm and copy it:

which node

Open cron job table with:

crontab -e

Add following statements for every day cron job at 9 am:

0 9 * * * <PATH_TO_NODE>/node <PATH_TO_REPO>/index.js >> /var/log/packtpub.log 2>&1

About

A bot for claim daily free learning ebooks from packtpub.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%