aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorNao Ueda <nao.uedder@gmail.com>2020-11-03 19:23:04 +0900
committerNao Ueda <nao.uedder@gmail.com>2020-11-03 19:23:04 +0900
commit28139ce2d8f03e8678fec8ab59622501480ab4a2 (patch)
tree6266d694f916157c942dd69fe6fdddc04fd57068 /README.md
parentd813bcb5b038e07db230813b084d24b6f1edc5ca (diff)
downloadppad-28139ce2d8f03e8678fec8ab59622501480ab4a2.tar.gz
ppad-28139ce2d8f03e8678fec8ab59622501480ab4a2.tar.bz2
ppad-28139ce2d8f03e8678fec8ab59622501480ab4a2.zip
fix README
Diffstat (limited to 'README.md')
-rw-r--r--README.md18
1 files changed, 14 insertions, 4 deletions
diff --git a/README.md b/README.md
index b096a61..5257ad9 100644
--- a/README.md
+++ b/README.md
@@ -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))