isometriks / reddit-bot-app
Reddit.com bot for Symfony2
Installs: 4
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 3
Forks: 0
Open Issues: 0
Type:project
Requires
- php: >=5.3.3
- debril/rss-atom-bundle: ~1.3
- h2s/reddit-api-client: dev-master@dev
- incenteev/composer-parameter-handler: ~2.0
- sensio/distribution-bundle: ~2.3
- sensio/framework-extra-bundle: ~3.0
- sensio/generator-bundle: ~2.3
- symfony/monolog-bundle: ~2.4
- symfony/symfony: ~2.4
This package is auto-updated.
Last update: 2024-10-24 09:32:08 UTC
README
Install with:
php composer.phar create-project isometriks/reddit-bot-app -s dev
Right now it's really only useful for RSS feeds, here's the configuration:
# Reddit Wrapper Config isometriks_reddit: user: %bot_user% password: %bot_password% # Bot RSS Config isometriks_reddit_bot: feeds: symfony2_blog: url: http://feeds.feedburner.com/symfony/blog subreddit: symfony flair: - news options: link: publicId symfony2_community: url: http://feeds.feedburner.com/symfony/planet?format=xml subreddit: symfony flair: - community options: link: publicId
The %bot_user%
and %bot_password%
will come from paramenters.yml and are set
in parameters.yml.dist if you use composer. You can use a cron job to make the
command run every hour by default or send an argument after:
0 * * * * php /home/symfonybot/app/console reddit:bot:rss
You can send arguments after to tell the bot how long to check:
php app/console reddit:bot:rss 5 hours ago
*Please note that you cannot use something like "-5 hours" as a command. The Symfony command component tries to recognize it as a flag. We're using an input as an array and then imploding on a space " " to turn it into a string.
TODO
- Add Flair after post is submitted