Skip to content

karlding/college-subreddits

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

college-subreddits

An eventually-complete list of college subreddits. The list at /r/college forms the basis for this college subreddit list, but since they have a restriction where they'll generally only add new subreddits with >500 subscribers, I created this list.

If you notice your college subreddit isn't on this list, feel free to open an issue (or submit a Pull Request).

Import

First strip off the headers in the CSV. Then,

sqlite3 data.db
CREATE TABLE "subreddits" ( `name` TEXT NOT NULL, `location` TEXT NOT NULL, `subreddit` TEXT NOT NULL UNIQUE COLLATE NOCASE )
.separator ','
.import data/colleges.csv subreddits

Or at once

tail -n+2 data/colleges.csv > data.csv && echo -e ".separator ","\nCREATE TABLE subreddits (name TEXT NOT NULL, location TEXT NOT NULL, subreddit TEXT NOT NULL UNIQUE COLLATE NOCASE);\n.import data.csv subreddits" | sqlite3 data.db && rm data.csv

Updating

INSERT INTO subreddits (name, location, subreddit) VALUES ('University of Waterloo', 'Waterloo, Ontario, Canada', 'uwaterloo');

Export

sqlite3 data.db <<!
.headers on
.mode csv
.output data/colleges.csv
SELECT name, location, subreddit FROM subreddits ORDER BY name ASC;
!

Releases

No releases published

Packages

No packages published