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 1098f32b0f changed config file 3 years ago
.gitignore Kawabunga! 3 years ago
LICENSE Initial commit 3 years ago
README.md changed config file 3 years ago
sample.config.js changed config file 3 years ago
update-hours.js changed config file 3 years 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.

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