All Projects → manojkarthick → Reddsaver

manojkarthick / Reddsaver

Licence: other
CLI tool to download saved and upvoted media from Reddit

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to Reddsaver

rreddit
𝐫⟋ Get Reddit data
Stars: ✭ 49 (-35.53%)
Mutual labels:  reddit, reddit-api
ARAW
The Android Reddit API Wrapper
Stars: ✭ 75 (-1.32%)
Mutual labels:  reddit, reddit-api
redditwatcher
📻 Reddit streaming CLI
Stars: ✭ 17 (-77.63%)
Mutual labels:  reddit, reddit-api
saveddit
Bulk Downloader for Reddit
Stars: ✭ 130 (+71.05%)
Mutual labels:  reddit, reddit-api
Psraw
PowerShell Reddit API Wrapper
Stars: ✭ 42 (-44.74%)
Mutual labels:  reddit-api, reddit
aPRAW
Asynchronous Python Reddit API Wrapper
Stars: ✭ 49 (-35.53%)
Mutual labels:  reddit, reddit-api
Mongit
💾 Mongo-esque Reddit-based Database!
Stars: ✭ 20 (-73.68%)
Mutual labels:  reddit, reddit-api
crypto-subreddits-cli
👽 Track Cryptocurrency Subreddits On The Command Line 👽
Stars: ✭ 24 (-68.42%)
Mutual labels:  reddit, reddit-api
Social Amnesia
Forget the past. Social Amnesia makes sure your social media accounts only show your posts from recent history, not from "that phase" 5 years ago.
Stars: ✭ 656 (+763.16%)
Mutual labels:  reddit-api, reddit
Jraw
The Java Reddit API Wrapper
Stars: ✭ 320 (+321.05%)
Mutual labels:  reddit-api, reddit
roux
Simple and (a)synchronous Reddit API wrapper for Rust.
Stars: ✭ 41 (-46.05%)
Mutual labels:  reddit, reddit-api
Snoo
A Reddit command line client written in Node.js, using modern ES-features
Stars: ✭ 39 (-48.68%)
Mutual labels:  reddit-api, reddit
reddit-image-fetcher
A JavaScript package for fetching reddit images, memes, wallpapers and more.
Stars: ✭ 40 (-47.37%)
Mutual labels:  reddit, reddit-api
cronnit.com
A free tool for scheduling posts to Reddit.
Stars: ✭ 3 (-96.05%)
Mutual labels:  reddit, reddit-api
node-express-reddit-clone
Build a Node, Express and MySQL-based clone of Reddit for DecodeMTL web development bootcamp
Stars: ✭ 28 (-63.16%)
Mutual labels:  reddit, reddit-api
set-top-reddit-wallpaper
PowerShell script to set the wallpaper as the top post of the day/week/month from /r/wallpapers and /r/wallpaper or any other subreddits.
Stars: ✭ 17 (-77.63%)
Mutual labels:  reddit, reddit-api
Unim.press
A Reddit front-page reader in the style of The New York Times.
Stars: ✭ 199 (+161.84%)
Mutual labels:  reddit-api, reddit
Praw
PRAW, an acronym for "Python Reddit API Wrapper", is a python package that allows for simple access to Reddit's API.
Stars: ✭ 2,675 (+3419.74%)
Mutual labels:  reddit-api, reddit
reddit-comment-bot
Reddit bot that auto replies to comments on set subreddits
Stars: ✭ 59 (-22.37%)
Mutual labels:  reddit, reddit-api
Shreddit
Remove your comment history on Reddit as deleting an account does not do so.
Stars: ✭ 669 (+780.26%)
Mutual labels:  reddit-api, reddit

Reddsaver build Crates.io

  • Command line tool to download saved/upvoted media from Reddit
  • Supports:
    • Reddit: PNG/JPG images, GIFs, Image galleries, videos
    • Giphy: GIFs
    • Imgur: Direct images and GIFVs
    • Gfycat/Redgifs: GIFs
  • GIF/GIFV from Imgur/Gfycat/Redgifs are downloaded as mp4
  • Does not support downloading images from Imgur post links

Installation

Recommended method

You can download release binaries here

Alternative methods

Using Homebrew

If you are a homebrew user on macOS, you can install using brew tap:

brew tap manojkarthick/reddsaver
brew install reddsaver

Arch Linux

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

Using cargo

If you already have Rust installed, you can also install using cargo:

cargo install reddsaver

Using nix

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
]; 

Building and running from source

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

Docker support

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

Running

  1. Create a new script application at https://www.reddit.com/prefs/apps
    • Click on create an app at the bottom of the page
    • Input a name for your application, for example: -reddsaver
    • Choose "script" as the type of application
    • Set "http://localhost:8080" or any other URL for the redirect url
    • Click on "create app" - you should now see the application has been created
    • Under your application name, you should see a random string - that is your client ID
    • The random string next to the field "secret" is your client secret
  2. Copy the client ID and client secret information returned
  3. 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

  1. Run the app!
# 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:

asciicast

Description and command line arguments

Optionally override the values for the directory to save and the env file to read from:

ReddSaver 0.3.2
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:

  • By default, reddsaver generates filenames for the images using a MD5 Hash of the URLs. You can instead generate human readable names using the --human-readable flag.
  • You can check the configuration used by ReddSaver by using the --show-config flag.

Other Information

Building for Raspberry Pi Zero W

To cross-compile for raspberry pi, this project uses rust-cross. Make sure you have docker installed on your development machine.

  1. Build the docker image for rust-cross: docker build -t rust-rpi-zerow:v1-openssl -f Dockerfile.raspberrypizerow .
  2. Make sure that the image name used here matches the image name in your Cross.toml configuration
  3. Run cross build --target arm-unknown-linux-gnueabi --release to build the project
  4. You can find the compiled binary under target/arm-unknown-linux-gnueabi/release/
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].