A place to place puppeteer scripts to fill in my hours for me.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Andres Becker fcdb024470 Mamma mia, here we go again... 1 year ago
.gitignore Kawabunga! 1 year ago
LICENSE Initial commit 1 year ago
README.md Mamma mia, here we go again... 1 year ago
sample.config.js changed config file 1 year ago
update-hours.js changed config file 1 year ago

README.md

simplicate-bot

A place to place puppeteer scripts to fill in my hours for me.

Install:

Requires: npm, nodejs, puppeteer

 $ git clone https://git.patxipierce.com/pxi/simplicate-bot
 $ cd simplicate-bot
 $ npm init
 $ npm i --save puppeteer # or yarn add puppeteer
 $ mv sample.config.js config.js
 $ vim config.js # Edit your user name and password and chrome path.

Puppeteer requirements on debian 9 (as of 2019-07-23)

You might need to install these libs to get chrome to start under debian stretch.

sudo apt install libx11-xcb-dev libxcomposite1 libxcursor1 libxdamage1 libxext6 libxi6 libxtst6 libnss3 libcups2 libxss1 libxrandr2 libasound2 libatk1.0-0 libatk-bridge2.0-0 libpangocairo-1.0-0 libgtk-3-0

update-hours.js

update-hours.js uses the config object to login to Simplicate and fill in the hours configured.

Config options:

To use a preinstalled browser change executablePath in sample.config.js to contain the full path to the executable chrome or chromium binary.

Checkout puppeteer for more config options.

Usage:

$ node update-hours.js

Or add it to your crontab!

With a small random variation.

0 18 * * fri  nobody  sleep $(( 1$(date +\%N) \% 60 )) ; node /path/to/simplicate-bot/update-hours.js