Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/atizo/PyTagCloud
Create beautiful tag clouds as images or HTML
https://github.com/atizo/PyTagCloud
Last synced: 2 months ago
JSON representation
Create beautiful tag clouds as images or HTML
- Host: GitHub
- URL: https://github.com/atizo/PyTagCloud
- Owner: atizo
- License: bsd-3-clause
- Created: 2010-08-02T18:01:28.000Z (over 14 years ago)
- Default Branch: master
- Last Pushed: 2018-12-01T22:41:44.000Z (about 6 years ago)
- Last Synced: 2024-09-18T00:42:27.446Z (4 months ago)
- Language: Python
- Homepage: https://labs.atizo.com/software/#pytagcloud
- Size: 2.09 MB
- Stars: 396
- Watchers: 31
- Forks: 128
- Open Issues: 13
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
- my-awesome-github-stars - atizo/PyTagCloud - Create beautiful tag clouds as images or HTML (Python)
README
=============
PyTagCloud
=============PyTagCloud let you create simple tag clouds inspired by http://www.wordle.net/
Currently, the following output formats have been written and are working:
- PNG images
- HTML/CSS codeIf you have ideas for other formats please let us know.
Installation
============You can install PyTagCloud either via the Python Package Index (PyPI) or from source.
To install using `pip`::
$ pip install -U pytagcloud
To install using `easy_install`::
$ easy_install -U pytagcloud
Downloading and installing from source
--------------------------------------Download the latest version of PyTagCloud from
http://pypi.python.org/pypi/pytagcloud/You can install it by doing the following,::
$ tar xfz pytagcloud-*.tar.gz
$ cd pytagcloud-*/
$ python setup.py build
$ python setup.py install # as rootRequirements
------------#. Install `pygame `_ >= 1.9.1::
$ apt-get install python-pygame
#. Install simplejson::$ pip install simplejson
Quick start
===========You probably want to see some code by now, so here's an example:
::from pytagcloud import create_tag_image, make_tags
from pytagcloud.lang.counter import get_tag_counts
YOUR_TEXT = "A tag cloud is a visual representation for text data, typically\
used to depict keyword metadata on websites, or to visualize free form text."tags = make_tags(get_tag_counts(YOUR_TEXT), maxsize=80)
create_tag_image(tags, 'cloud_large.png', size=(900, 600), fontname='Lobster')import webbrowser
webbrowser.open('cloud_large.png') # see resultsMore examples can be found in `test.py `_.
Example
=======
`Demo `_.. image:: https://github.com/atizo/PyTagCloud/raw/master/docs/example.png
Contributing
============Development of `pytagcloud` happens at Github: https://github.com/atizo/PyTagCloud
You are highly encouraged to participate in the development
of `pytagcloud`. If you don't like Github (for some reason) you're welcome
to send regular patches.