Created
January 2, 2015 18:19
-
-
Save Bachmann1234/1bf0de393075eea022a2 to your computer and use it in GitHub Desktop.
Word Clouds
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from os import path | |
import sys | |
from wordcloud import WordCloud | |
d = path.dirname(__file__) | |
# Read the whole text. | |
text = open(path.join(d, sys.argv[1])).read() | |
wordcloud = WordCloud().generate(text) | |
wordcloud.to_file(path.join(d, "repo.png")) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Script requires a font path to be exported