Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dgautsch/soxbot
Updates baseball standings on a Reddit subreddit.
https://github.com/dgautsch/soxbot
Last synced: about 1 month ago
JSON representation
Updates baseball standings on a Reddit subreddit.
- Host: GitHub
- URL: https://github.com/dgautsch/soxbot
- Owner: dgautsch
- License: gpl-3.0
- Created: 2013-03-19T17:07:17.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-04-06T12:56:58.000Z (over 11 years ago)
- Last Synced: 2023-05-16T05:27:07.091Z (over 1 year ago)
- Language: Python
- Size: 137 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
soxbot
======Updates baseball standings on a Reddit subreddit.
Requirements
-------------You need to make sure your installation of Python has [praw](https://github.com/praw-dev/praw)
Usage
-----Setup a developer account at http://sportsdatallc.org/ and create a trial key for usage with this bot. Please be aware of the data usage limitations or you risk your key being throttled and deactivated.
Enter all your user information into rlogin.py. You'll need your Reddit username, password, and subreddit. You'll also need to define a reddit user agent. MAKE SURE THIS IS UNIQUE. If it is not unique you risk the account being banned by Reddit. See here: https://github.com/reddit/reddit/wiki/API
Subreddit Configuration
-------------------------------------------I've currently setup the script to look for the string **Standings** in your subreddit description and then truncate it and replace it with the new standings. It is very important that the subreddit description places the **Standings** header at the bottom of the description so it doesn't cut off anything you don't want to lose. I know this is rudimentary currently and maybe with more time and development I can make a smarter solution. But for now this works and gets the job done.
Cron
---------
Once your data is entered into rlogin.py you'll need setup a cronjob on your server to have the main.py file run nightly to update your settings. This is assuming you are using a Linux server. Either way the script needs to be run once a day to update the standings on your Subreddit.Future Additions
-----------------------------
[ ] Add error handling.[ ] Improve the way the bot inputs the standings and the formatting of the standings.
[ ] Create Game Threads automatically for your specified subreddit.