59 lines
1.8 KiB
Markdown
59 lines
1.8 KiB
Markdown
# reddit-submit
|
|
*Submit a self post to reddit*
|
|
|
|
## Installation
|
|
|
|
### Download
|
|
|
|
```sh
|
|
sudo git clone https://gitea.gf4.pw/ki9/reddit-submit.git /usr/local/src/reddit-submit
|
|
```
|
|
|
|
### Build
|
|
|
|
```sh
|
|
sudo ln -s /usr/local/src/reddit-submit/reddit-submit /usr/local/bin/reddit-submit
|
|
```
|
|
|
|
## Configuration
|
|
|
|
Copy sample config to your home directory and edit it.
|
|
|
|
```sh
|
|
cp /usr/local/src/reddit-submit/.sample.reddit.rc ~/.reddit.rc
|
|
vim ~/.reddit.rc
|
|
```
|
|
|
|
Add your reddit username and password. You'll need to create a new API "app" from [www.reddit.com/prefs/apps](https://www.reddit.com/prefs/apps). When prompted, select `script` from the `type` dropdown and add any memorable name.
|
|
|
|
|
|
## Updating
|
|
|
|
```sh
|
|
cd /usr/local/src/reddit-submit
|
|
git pull
|
|
```
|
|
|
|
## Usage
|
|
|
|
Once your `.reddit.rc` file has been configured, you can submit a post to [r/test](https://www.reddit.com/r/test) or any subreddit using:
|
|
|
|
```sh
|
|
echo "This is the post's body" | reddit-submit "This is a test title" test
|
|
```
|
|
|
|
### Automation
|
|
|
|
**TODO**: Add systemd files and timer examples
|
|
|
|
## License
|
|
|
|
**reddit-submit** - *Submit a self post to reddit*\
|
|
Copyright © 2019-2021 Keith Irwin [www.ki9.us](https://www.ki9.us/)
|
|
|
|
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License along with this program. If not, see <[http://www.gnu.org/licenses/](http://www.gnu.org/licenses/)>.
|