Crates.io | reddsaver |
lib.rs | reddsaver |
version | 0.4.0 |
source | src |
created_at | 2021-01-02 15:59:36.405766 |
updated_at | 2021-09-05 04:26:34.529876 |
description | CLI tool to download saved media from Reddit |
homepage | https://github.com/manojkarthick/reddsaver |
repository | https://github.com/manojkarthick/reddsaver |
max_upload_size | |
id | 330626 |
size | 119,764 |
To download videos hosted by Reddit, you need to have ffmpeg installed. Follow this link for installation instructions.
You can download release binaries here
If you are a macports user on macOS, you can install reddsaver using port
:
sudo port selfudpate
sudo port install reddsaver
If you are a homebrew user on macOS, you can install using brew tap
:
brew tap manojkarthick/reddsaver
brew install reddsaver
If you are an ArchLinux user, then you can use a tool like yay
or paru
to install it from the AUR:
yay -S reddsaver
If you already have Rust installed, you can also install using cargo
:
cargo install reddsaver
If you are a nix user, you can install reddsaver from nixpkgs
nix-env --install reddsaver
or, if you manage your installation using home-manager, add to your home.packages
:
home.packages = [
pkgs.reddsaver
];
Make sure you have rustc v1.50.0
and cargo installed on your machine.
git clone https://github.com/manojkarthick/reddsaver.git
cargo build --release
./target/release/reddsaver
Pre-built docker images are available on Docker Hub
mkdir -pv data/
docker run --rm \
--volume="$PWD/data:/app/data" \
--volume="$PWD/reddsaver.env:/app/reddsaver.env" \
manojkarthick/reddsaver:latest -d /app/data -e /app/reddsaver.env
reddsaver.env
:CLIENT_ID="<client_id>"
CLIENT_SECRET="<client_secret>"
USERNAME="<username>"
PASSWORD="<password>"
NOTE: If you have 2FA enabled, please make sure you set PASSWORD=<password>:<2FA_TOTP_token>
instead
# Create a directory to save your images to
mkdir -pv reddsaver/
# Check if you installation is working properly
reddsaver --help
# Check if the right configuration has been picked up
# NOTE: In case the `USERNAME` variable is being overriden by
# your system username, please use
# On Linux/Mac - unset USERNAME
# On Windows - set USERNAME=
# before running to temporarily remove the system username
# from your environment
reddsaver -e reddsaver.env -d reddsaver --show-config
# Run the app to download the saved media
reddsaver -e reddsaver.env -d reddsaver
# Also allows you to download upvoted media
reddsaver -e reddsaver.env -d reddsaver --upvoted
NOTE: When running the application beyond the first time, if you use the directory as the initial run, the application will skip downloading the images that have already been downloaded.
View it in action here:
Optionally override the values for the directory to save and the env file to read from:
ReddSaver 0.4.0
Manoj Karthick Selva Kumar
Simple CLI tool to download saved media from Reddit
USAGE:
reddsaver [FLAGS] [OPTIONS]
FLAGS:
-r, --dry-run Dry run and print the URLs of saved media to download
-h, --help Prints help information
-H, --human-readable Use human readable names for files
-s, --show-config Show the current config being used
-U, --undo Unsave or remote upvote for post after processing
-u, --upvoted Download media from upvoted posts
-V, --version Prints version information
OPTIONS:
-d, --data-dir <DATA_DIR> Directory to save the media to [default: data]
-e, --from-env <ENV_FILE> Set a custom .env style file with secrets [default: .env]
-S, --subreddits <SUBREDDITS>... Download media from these subreddits only
Some points to note:
--human-readable
flag.--show-config
flag.To cross-compile for raspberry pi, this project uses rust-cross. Make sure you have docker installed on your development machine.
docker build -t rust-rpi-zerow:v1-openssl -f Dockerfile.raspberrypizerow .
Cross.toml
configurationcross build --target arm-unknown-linux-gnueabi --release
to build the projecttarget/arm-unknown-linux-gnueabi/release/