Project

subreddit

0.0
No commit activity in last 3 years
No release in over 3 years
The library uses nokogiri to generate a random subreddit from reddit.com using the random subreddit link. Also includes a bonus file that gives you the top link from that subreddit. Use that by modifying the first line in the lib/subreddit.rb file.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

 Project Readme

subreddit

Generates a random subreddit on the command line

This repository holds the source code for the subreddit ruby gem.

If you have ruby installed on your machine you shoud just be able to type

> gem install subreddit

to start using this gem.

Ruby gem

Installing the subreddit gem should include all required dependencies.

For more information see: subreddit at rubygems.org

Running the executable

To run the command line interface, first install the gem and then type:

> subreddit

from anywhere on your command line. This generates a random subreddit to your terminal.

Bonus! First link from the subreddit!

I've also included the ability to also print the title of the first link from the subreddit. If you wish to use this option, you'll have to modify the gem.

In the

lib/subreddit.rb

file, change the first line from

require_relative 'subreddit_generator.rb'

to

require_relative 'subreddit_generator_with_link.rb'

Once you make this change and save the file, you can run the

> subreddit

command as normal.

Ideas for further exploration:

I hope to modifiy the gem so that you can just type a different command to get the "with link" option. Also I want to take this to the web. More info coming soon!