infra/roles/mainframe/templates/reddit-archives.sh.j2

14 lines
540 B
Django/Jinja

#!/bin/bash
LOCKFILE=/tmp/reddit-archives.lock
lockfile -r 0 $LOCKFILE || exit 1
python3 -m bdfr clone {{ archives.reddit.path }}/r/ --make-hard-links --no-dupes --search-existing --subreddit "{{ archives.reddit.subreddits | join(',') }}" --file-scheme "{DATE}_{POSTID}_{TITLE}_{REDDITOR}" --sort new
rm -f $LOCKFILE
# download individual post with:
# python3 -m bdfr clone /deadspace/archives/pub/reddit.com/r/ --make-hard-links --no-dupes --search-existing --file-scheme "{DATE}_{POSTID}_{TITLE}_{REDDITOR}" --sort new --link $LINK