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]
                     [--version]

Named Arguments

--text

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

Default: -

--regexp override the regular expression defining what constitutes a word
--stopwords specify file of stopwords (containing one word per line) to remove from the given text after parsing
--imagefile

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

Default: -

--fontfile path to font file you wish to use (default: DroidSansMono)
--mask mask to use for the image form
--colormask color mask to use for image coloring
--contour_width
 

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

Default: 0

--contour_color
 

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

Default: “black”

--relative_scaling
 
scaling of words by frequency (0 - 1)

Default: 0

--margin

spacing to leave around words

Default: 2

--width

define output image width

Default: 400

--height

define output image height

Default: 200

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

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

Default: “black”

--no_collocations
 

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

Default: True

--version show program’s version number and exit