Cleared up readme

master
Andres Becker 3 years ago
parent faf0b5669a
commit b6afd0de3a
  1. 12
      README.md
  2. 6
      update-hours.js

@ -12,22 +12,18 @@ Requires:
$ 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
```
## update-hours.js
`update-hours.js` uses the config object to login to Simplicate and fill in the hours configured.
### Configuration:
1. Add your credentials and options to `sample-config.js`.
2. Rename `sample-config.js` to `config.js`.
3. Done!
**More config options:**
**Config options:**
To use a preinstalled browser change `executablePath` in update-hours.js to contain the full path to the executable chrome or chromium binary.
```javascript
const browser = await puppeteer.launch({
headless: true,

@ -10,6 +10,8 @@
* $ npm init
* $ npm i --save puppeteer # or yarn add puppeteer
* $ vim update-hours.js # this file (edit executablePath below)
* $ mv sample.config.js config.js
* $ vim config.js # Edit your user name and password
*
* Usage:
* $ cd {to this directory}
@ -80,6 +82,10 @@ const config = require('./config');
/*
* TODO, Error handling in case save does not work.
await Promise.race([
page.waitForNavigation({ waitUntil: "networkidle0" }),
page.waitForSelector(".Error")
]);
*/
await browser.close()

Loading…
Cancel
Save