GithubHelp home page GithubHelp logo

imclab / pytagcloud Goto Github PK

View Code? Open in Web Editor NEW

This project forked from atizo/pytagcloud

0.0 1.0 0.0 1.97 MB

Create beautiful tag clouds as images or HTML

Home Page: https://labs.atizo.com/software/#pytagcloud

License: BSD 3-Clause "New" or "Revised" License

pytagcloud's Introduction

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 code

If 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 root

Requirements

  1. Install pygame >= 1.9.1:

    $ apt-get install python-pygame
    
  2. 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 results

More examples can be found in test.py.

Example

Demo

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.

pytagcloud's People

Contributors

jsma avatar justis avatar kernc avatar konstantint avatar paulklinger avatar ubershmekel avatar yossi avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.