|
@@ -21,10 +21,12 @@ On a Unix-like server install
|
|
|
- a recent version of [nodejs](https://nodejs.org/en/download)
|
|
|
|
|
|
Clone this repo and cd into it:
|
|
|
+
|
|
|
git clone https://github.com/noahvogt/postlink.js
|
|
|
cd postlink
|
|
|
|
|
|
Then, install the dependencies:
|
|
|
+
|
|
|
npm install puppeteer imap-simple yaml jsdom quoted-printable pdf-merger-js pdf-lib axios
|
|
|
|
|
|
Apply your custom config in `config.yaml`. This example config serves enough of an explanation. If not, consult the source code.
|
|
@@ -86,11 +88,15 @@ generate:
|
|
|
```
|
|
|
|
|
|
Run via
|
|
|
+
|
|
|
node postlink.js
|
|
|
|
|
|
-For periodic runs we recommend, as mentioned above, cronjobs.
|
|
|
+For periodic runs we recommend, as mentioned above, cronjobs. For example, to run the script every day @ 23:30 I use:
|
|
|
+
|
|
|
+ 30 23 * * * (cd /home/postlink/postlink/; /home/postlink/.nvm/versions/node/v22.15.0/bin/node /home/postlink/postlink/postlink.js | logger -t postlink; echo "postlink exit code: $?" | logger -t postlink)
|
|
|
+
|
|
|
+For testing purposes, you can run with the option `--dry-run` to not upload the *infomail* the the church computer and not send api requests to pingen.com.
|
|
|
|
|
|
-For testing purposes, you can run with the option `--dry-run` to not upload the *infomail* the the curch computer and not send api requests to pingen.com.
|
|
|
node postlink.js --dry-run
|
|
|
|
|
|
## Licensing
|