You can download release binaries here
If you already have Rust installed, you can also install using cargo
:
cargo install reddsaver
Make sure you have rustc v1.48.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" \
reddsaver:latest -d /app/data -e /app/reddsaver.env
Create a .env file with the following keys, for example 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
Run the app! ```
mkdir -pv reddsaver/
reddsaver --help
reddsaver -e reddsaver.env -d reddsaver --show-config
reddsaver -e reddsaver.env -d reddsaver ```
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.2.2 Manoj Karthick Selva Kumar Simple CLI tool to download saved images from Reddit
USAGE: reddsaver [FLAGS] [OPTIONS]
FLAGS: -r, --dry-run Dry run and print the URLs of saved images 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 -V, --version Prints version information
OPTIONS:
-d, --data-dir
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/