diff options
author | Nao Ueda <nao.uedder@gmail.com> | 2020-11-03 19:24:22 +0900 |
---|---|---|
committer | Nao Ueda <nao.uedder@gmail.com> | 2020-11-03 19:24:22 +0900 |
commit | 193407686a0cb4858f4e403d8f54eba0404454a4 (patch) | |
tree | 885c6c3978ca55feb3fb9331f24e0df76c46015f /README.md | |
parent | ca6a7f96a59d46ce0583fa62eeb49d803f3f5a63 (diff) | |
parent | cae02018b4ecd61fb8f2ee594775474c3f8f062f (diff) | |
download | ppad-193407686a0cb4858f4e403d8f54eba0404454a4.tar.gz ppad-193407686a0cb4858f4e403d8f54eba0404454a4.tar.bz2 ppad-193407686a0cb4858f4e403d8f54eba0404454a4.zip |
Merge branch 'pkg' into main0.0.7
the first release to pip
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 18 |
1 files changed, 14 insertions, 4 deletions
@@ -1,16 +1,26 @@ # 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.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) +$ 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)) |