diff options
author | EuAndreh <eu@euandre.org> | 2019-05-18 23:10:32 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2019-05-19 01:56:54 -0300 |
commit | f6b508cc67c79b225d88f66c0fbfce787c80ace2 (patch) | |
tree | 396325b716411ec16d1d89713ae097c8f8aeb5d6 /scripts/archive.sh | |
parent | Add cljr flag for cider (diff) | |
download | dotfiles-f6b508cc67c79b225d88f66c0fbfce787c80ace2.tar.gz dotfiles-f6b508cc67c79b225d88f66c0fbfce787c80ace2.tar.xz |
Add ArchiveBox setup
- add repo to mrconfig;
- create daily log file;
- add `archivebox` executable to $PATH;
- create cronjob to run every 12 hours;
- backup ~/archive/ folder.
Side note: medium.com DNS resolves to an IPv6 address but rejects connections
from clients that try to reach medium using it. I had to force an IPv4
connection instead.
Diffstat (limited to 'scripts/archive.sh')
-rwxr-xr-x | scripts/archive.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/scripts/archive.sh b/scripts/archive.sh new file mode 100755 index 0000000..416b833 --- /dev/null +++ b/scripts/archive.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash +set -euo pipefail +cd "$(dirname "${BASH_SOURCE[0]}")" + +export POCKET_ARCHIVE='https://getpocket.com/users/euandreh/feed/read' +export OUTPUT_DIR="$HOME/archive/archivebox/" +export WGET_BINARY="$PWD/wget-4.sh" +export FETCH_MEDIA=False +if [ "${1-}" = "-s" ]; then + curl -s "$POCKET_ARCHIVE" | archivebox >> /tmp/archivebox.log +else + curl -s "$POCKET_ARCHIVE" | archivebox +fi |