This script uses the praw module to create a reddit scraper that searches submissions and comments for the word SQL proceeded by either 'a' or 'an'. If people are saying 'a SQL', we can assume they are pronouncing the word 'sequal'. If on the other hand, they are typing 'an SQL', we assume they are saying 'a ESS-QUE-EL'.
0) make sure that you have praw, scipy and matplotlib installed (unless you are installing via docker)
pip install praw scipy matplotlib
1) clone this repo to your computer.
git clone https://github.com/brianSalk/sql_or_sequal
2) create a reddit account if you do not already have one
3) create a reddit app make sure you check the option for script
4) in your cloned repository, create a new folder called cridentials.py
.
touch credentials.py
5) Using the information from the reddit.com/prefs/apps, create the following 5 variables and store them in credentials.py
client_secret="asdfkajsldfkjasj83j823j" # located after word "secret"
client_id="29829383983f9h2389fh2398fh2" # located right under app name
usename="me123" # your reddit user name
password="secret12" # your reddit password
useragent="blahblah" # set equal to any string
This picture shows you where the client_id and client_secret are.
python sql_or_sequal.py -h
python sql_or_sequal.py -s 'sql+programminghumor' -l 300 --chart
If you are looking for some low-hanging fruit contributions to make here is how you can help
1) provide additional documentation/comments for this code
2) do some kind of analysis using this project (be creative!)
3) set up a docker file to allow this program to run on windows.