Metadata-Version: 2.1
Name: ppad
Version: 0.0.7
Summary: Papertrail log archives downloader
Home-page: https://github.com/nao0x2c6/ppad
Author: Nao Ueda
Author-email: nao.uedder@gmail.com
License: UNKNOWN
Keywords: papertrail
Platform: UNKNOWN
Classifier: License :: OSI Approved :: GNU General Public License v2 (GPLv2)
Classifier: Programming Language :: Python :: 3.6
Description-Content-Type: text/markdown
Requires-Dist: progressbar2 (>=3)
Requires-Dist: python-dateutil (>=2)
Requires-Dist: pytz (>=2020)
Requires-Dist: requests (>=2)

# Papertrail log archives downloader

## Install

Please use [pip](https://pip.pypa.io/)

```
pip install ppad
```

## Usage

Please set your token to the environment variable named `PAPERTRAIL_API_TOKEN` to run the script.

```bash
$ PAPERTRAIL_API_TOKEN=YOUR_TOKEN ppad # Download all the log archives
$ PAPERTRAIL_API_TOKEN=YOUR_TOKEN ppad 2020-01-01~2020-02-01 # Download the archives which have logged January 2020
$ PAPERTRAIL_API_TOKEN=YOUR_TOKEN ppad 2020-01-01~ # Specified the since date (including the since date file)
$ PAPERTRAIL_API_TOKEN=YOUR_TOKEN ppad ~2020-02-01 # Specified the until date (NOT including the until date file)
```

By running the above command(s), you can get the log archives named such as `2020-01-01-XX.tsv.gz` in the current directory.

The date format is ISO-8601 format supported.

(The script uses [dateutil.isoparse](https://dateutil.readthedocs.io/en/stable/parser.html#dateutil.parser.isoparse))


