A Reddit download bot
Project description
grab - a Reddit download bot
This is a simple Python script to download submissions containing images from any specified subreddit.
All images are placed in the ~/Downloads/grab-bot/[subreddit]/[date] by default. The download path however can be changed through the GUI or config file.
"grab.ini" is the configuration file used by the program. It will be generated with default values in case it is not present when the program is run. This file will be created in your home directory.
"downloaded.txt" lists all previously downloaded images from their subreddit. This was done to avoid downloading images multiple times in an effort to save bandwidth and make subsequent executions of the program faster.
This program supports mainly Linux. Windows support is still in testing.
Table of Contents
TODO
- GUI for selecting subreddits
- Change download location through GUI
- Change the download limit
- Change the category
- CLI option for launching the gui. Done through grab-reddit-gui.
- Make the GUI look better
- Create CLI options for newgrab.py to create config files in the terminal
- Automatically schedule program execution (Can be done manually with cron)
How to use
Follow the installation instructions.
To add subreddits open the gui, click on the "+" Button and type in the subreddit you want to add.
To remove a subreddit, select one from the list and click on the "-" in the top right. Click yes in the following dialog.
Clicking ">" will expand the window to change the category, limit and download path. Clicking "Run" in the GUI will execute grab.py.
The theme can be changed by clicking on "light" or "dark". The dark theme is still work in progress.
To run the program in the terminal use grab-download <args>
. If you want the gui version, run grab-reddit-gui
.
Help for arguments taken by grab-download
can be found by executing grab-download -h
.
Setting up cron for repeated executions is covered below.
Problems
This program relies on a stable internet connection when adding new subreddits, as each subreddit is checked for whether it can be reached. If your connection is unstable or very slow this can lead to hanging in the GUI.
Installation
To install all requirements follow the instructions for your distribution shown below.
Arch
Open a terminal and execute the following commands.
sudo pacman -S python-pip
sudo pip install grab-reddit
If you want to install the program to your local user, make sure to add your .local/bin directory to your PATH.
pip install --user grab-reddit
Debian
Open a terminal and execute the following commands.
sudo apt-get install python3-pip python3-tk
pip3 install grab-reddit
Fedora
Open a terminal and execute the following commands.
sudo dnf install python3 python3-wheel python3-tkinter
pip install --user grab-reddit
Windows
Program still undergoing testing
Install python from the python homepate.
I suggest you to check "Add to my PATH".
After a reboot open a terminal and execute the following command.
pip install grab-reddit
To use the CLI run grab-reddit <args>
. For the gui version use grab-reddit-gui
.
Known Bugs
Cron
This program comes with its own little execution scheduler included. It can be called with grab-reddit-sched
in the terminal.
To execute this program it is best to specify the full path to the binary executable
On Linux you should be able to find the path with which grab-reddit
Example setup for hourly execution
0 * * * * /home/marc/.local/bin/grab-reddit
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for grab_reddit-0.0.8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 52ec64d458e23877176b671049433555424648361dcbc6219a5a90c33fd47467 |
|
MD5 | 82295ae9a53a8ceec5ce29c2abdc5555 |
|
BLAKE2b-256 | a8f1789c84ca9d3e6b9887fcdd5ae35fec605e5cdb39c67c6327c9da09882fdf |