Skip to main content

Python3.7+ wrapper for generating word clouds from a Reddit user's comments.

Project description

Reddit Comment Cloud

Python3.7+ wrapper for generating word clouds from a Reddit user's comments.

Reddit Comment Cloud for /u/SuddenlySnowden

Built upon

Use

This example will render the WordCloud of /u/SuddenlySnowden and save the image under SuddenlySnowden.png in the current working directory.

from redditcommentcloud import CommentCloud
cc = CommentCloud()
cc.renderWordCloud(username='SuddenlySnowden')

Install

The code was written for Python3.7+.

Optionally: Create a Python virtual environment:

python -m venv .venv
source .venv/bin/activate

Type deactivate when you are done

Clone this repository or install it using pip install redditcommentcloud.

Installing the dependencies

pip install -r requirements.txt

Supply Reddit API credentials This tool requires API credentials for the Reddit API. Go to https://www.reddit.com/prefs/apps/, create an app and copy the keys.

Copy redditcommentcloud/config.py.template to redditcommentcloud/config.py and fill in the details. Freely choose a presumably unique User-Agent for the bot.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

redditcommentcloud-0.1.1.tar.gz (2.5 kB view hashes)

Uploaded Source

Built Distribution

redditcommentcloud-0.1.1-py3-none-any.whl (15.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page