Examples¶
Python Source File¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | """ Create a wordcloud from a single Python source file """ # stdlib import pathlib # this package from wordle import Wordle, export_wordcloud filename = pathlib.Path('.').absolute().parent / "wordle/__init__.py" w = Wordle(random_state=5678) w.generate_from_file(filename, outfile="python_wordcloud.svg") export_wordcloud(w, outfile="python_wordcloud.png") |
C Source File¶
1 2 3 4 5 6 7 8 9 10 | """ Create a wordcloud from a single C source file """ # this package from wordle import Wordle, export_wordcloud w = Wordle(random_state=5678) w.generate_from_file("example.c", outfile="c_wordcloud.svg") export_wordcloud(w, outfile="c_wordcloud.png") |
Folium git repository¶
1 2 3 4 5 6 7 8 9 10 11 12 | """ Create a wordcloud from the Folium git repository. https://github.com/python-visualization/folium """ # this package from wordle import Wordle, export_wordcloud w = Wordle(random_state=5678) w.generate_from_git("https://github.com/python-visualization/folium", outfile="folium_wordcloud.svg") export_wordcloud(w, outfile="folium_wordcloud.png") |