Update README.md

This commit is contained in:
freearhey 2023-07-19 22:38:48 +03:00
parent 3a4f59721a
commit bf5a716214
1 changed files with 13 additions and 0 deletions

View File

@ -51,12 +51,25 @@ To download a guide in a specific language pass its [ISO 639-1](https://en.wikip
npm run grab -- --site=example.com --lang=fr npm run grab -- --site=example.com --lang=fr
``` ```
To also create a compressed version of the guide, add the `--gzip` flag:
```sh
npm run grab -- --site=example.com --gzip
```
After the download is completed in the current directory will appear a new folder `guides`, which will store all XML files: After the download is completed in the current directory will appear a new folder `guides`, which will store all XML files:
```sh ```sh
guides guides
└── fr └── fr
└── example.com.xml └── example.com.xml
└── example.com.xml.gz
```
If you want to download the guide automatically on a schedule, you need to pass a valid [cron expression](https://crontab.guru/) to the script using the `--cron` attribute:
```sh
npm run grab -- --site=example.com --cron="0 0 * * *"
``` ```
Also you can make these guides available via URL by running your own server: Also you can make these guides available via URL by running your own server: