Sha256: 9bdb400e4f096b4021f03bcc1c8f50eb5110706a6cf65e331e0ecbd3c94882e1

Contents?: true

Size: 437 Bytes

Versions: 10

Compression:

Stored size: 437 Bytes

Contents

#!/bin/bash
#
# Download papertrail log files. Usage:
#
# PAPERTRAIL_API_TOKEN=... examples/papertrail_download 2017-02-10

date=${1:-`date -v -1d "+%Y-%m-%d"`} # would be --date "1 day ago" on Linux

file=/tmp/papertrail-$date.tsv.gz
url=https://papertrailapp.com/api/v1/archives/$date/download

echo "Downloading $url to $file..."

curl -silent --no-include -o $file -L -H "X-Papertrail-Token: $PAPERTRAIL_API_TOKEN" $url
gunzip $file

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
log_stats-0.4.9 example/papertrail_download
log_stats-0.4.8 example/papertrail_download
log_stats-0.4.7 example/papertrail_download
log_stats-0.4.6 example/papertrail_download
log_stats-0.4.5 example/papertrail_download
log_stats-0.4.4 example/papertrail_download
log_stats-0.4.3 example/papertrail_download
log_stats-0.4.2 example/papertrail_download
log_stats-0.4.1 example/papertrail_download
log_stats-0.4.0 example/papertrail_download