Command Line Interface

A simple command line interface for wordcloud module.

usage: wordcloud_cli [-h] [--text file] [--regexp regexp] [--stopwords file]
                     [--imagefile file] [--fontfile path] [--mask file]
                     [--colormask file] [--contour_width width]
                     [--contour_color color] [--relative_scaling rs]
                     [--margin width] [--width width] [--height height]
                     [--color color] [--background color] [--no_collocations]
                     [--include_numbers] [--min_word_length min_word_length]
                     [--prefer_horizontal ratio] [--scale scale]
                     [--colormap map] [--mode mode] [--max_words N]
                     [--min_font_size size] [--max_font_size size]
                     [--font_step step] [--random_state seed]
                     [--no_normalize_plurals] [--repeat] [--version]

Named Arguments


specify file of words to build the word cloud (default: stdin)

Default: -


override the regular expression defining what constitutes a word


specify file of stopwords (containing one word per line) to remove from the given text after parsing


file the completed PNG image should be written to (default: stdout)

Default: -


path to font file you wish to use (default: DroidSansMono)


mask to use for the image form


color mask to use for image coloring


if greater than 0, draw mask contour (default: 0)

Default: 0


use given color as mask contour color - accepts any value from PIL.ImageColor.getcolor

Default: “black”


scaling of words by frequency (0 - 1)

Default: 0


spacing to leave around words

Default: 2


define output image width

Default: 400


define output image height

Default: 200


use given color as coloring for the image - accepts any value from PIL.ImageColor.getcolor


use given color as background color for the image - accepts any value from PIL.ImageColor.getcolor

Default: “black”


do not add collocations (bigrams) to word cloud (default: add unigrams and bigrams)

Default: True


include numbers in wordcloud?

Default: False


only include words with more than X letters

Default: 0


ratio of times to try horizontal fitting as opposed to vertical

Default: 0.9


scaling between computation and drawing

Default: 1


matplotlib colormap name

Default: “viridis”


use RGB or RGBA for transparent background

Default: “RGB”


maximum number of words

Default: 200


smallest font size to use

Default: 4


maximum font size for the largest word


step size for the font

Default: 1


random seed


whether to remove trailing ‘s’ from words

Default: True


whether to repeat words and phrases

Default: False


show program’s version number and exit