Fork me on GitHub

PyTagCloud-CJK

Create beautiful tag clouds as images or HTML.
PyTagCloud-CJK was forked from atizo's PyTagCloud to enable international character support.

Supported characters

Supports the following characters and free fonts.

Installation

Try:

$ pip install git+https://github.com/e9t/PyTagCloud.git

Otherwise to install from source, download (zip, tar) or clone the project with Git, then install:

$ git clone git://github.com/e9t/PyTagCloud-CJK
$ cd PyTagCloud
$ python setup.py install

Usage

Usage examples can be found here

import random; random.seed(0)
import webbrowser

import pytagcloud # https://github.com/e9t/PyTagCloud-CJK (not the one in PyPI)

r = lambda: random.randint(0,255)
color = lambda: (r(), r(), r())

tags = [
        {'color': color(), 'tag': u'برچسب ها:', 'size': 100},
        {'color': color(), 'tag': u'کلمات کلیدی', 'size': 70},
        {'color': color(), 'tag': u'فونت میتر', 'size': 50}
       ]

filename = 'arabic.png'
pytagcloud.create_tag_image(tags, filename, fontname='B Mitra', size=(800, 600))
webbrowser.open(filename)

Maintainer

Original Authors