blob: b096a613432616694828c3f07be2563cea0aeaf0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
# Papertrail log archives downloader
## Usage
Please set your token to the environment variable named `PAPERTRAIL_API_TOKEN` to run the script.
```bash
$ PAPERTRAIL_API_TOKEN=YOUR_TOKEN ./ppad.py # Download all the log archives
$ PAPERTRAIL_API_TOKEN=YOUR_TOKEN ./ppad.py 2020-01-01~2020-02-01 # Download the archives which have logged January 2020
$ PAPERTRAIL_API_TOKEN=YOUR_TOKEN ./ppad.py 2020-01-01~ # Specified the since date (including the since date file)
$ PAPERTRAIL_API_TOKEN=YOUR_TOKEN ./ppad.py ~2020-02-01 # Specified the until date (NOT including the until date file)
```
The date format is ISO-8601 format supported.
(The script uses [dateutil.isoparse](https://dateutil.readthedocs.io/en/stable/parser.html#dateutil.parser.isoparse))
|