File: __main__.py

package info (click to toggle)
python-wordcloud 1.8.2.2%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 328 kB
  • sloc: python: 2,790; sh: 40; makefile: 9
file content (37 lines) | stat: -rw-r--r-- 857 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# -*- coding: utf-8 -*-
"""Command line tool to generate word clouds

The name ``__main__.py`` is important as it enables execution
of the module using ``python -m wordcloud`` syntax.

Usage:

* using ``wordcloud_cli`` executable::

    $ cat word.txt | wordcloud_cli

    $ wordcloud_cli --text=words.txt --stopwords=stopwords.txt

* using ``wordcloud`` module::

    $ cat word.txt | python -m wordcloud

    $ python -m wordcloud --text=words.txt --stopwords=stopwords.txt
"""

import sys

from .wordcloud_cli import main as wordcloud_cli_main
from .wordcloud_cli import parse_args as wordcloud_cli_parse_args


def main():
    """The main entry point to wordcloud_cli``.

    This is installed as the script entry point.
    """
    wordcloud_cli_main(*wordcloud_cli_parse_args(sys.argv[1:]))


if __name__ == '__main__':  # pragma: no cover
    main()