TagCloud allows you to generate tag cloud images which base on an input word list and a shape image.
 
 
Go to file
Jonas Thiel 92cd2e93de Release new version as jar 2013-05-15 16:25:16 +02:00
build Release new version as jar 2013-05-15 16:25:16 +02:00
examples Rename example file 2013-03-15 12:38:33 +01:00
lib Remove unused jars 2013-03-15 11:26:57 +01:00
src Read input file always with UTF8 encoding 2013-05-15 16:25:03 +02:00
.gitignore Initial version 2013-03-11 16:56:43 +01:00
LICENSE Add LICENSE 2013-03-15 12:36:20 +01:00
README.md Add README 2013-03-15 12:54:24 +01:00
config.properties Refector and documentations 2013-03-15 11:27:14 +01:00
input.txt Read input file always with UTF8 encoding 2013-05-15 16:25:03 +02:00
run.sh Typo 2013-03-15 12:34:06 +01:00
shape.png Initial version 2013-03-11 16:56:43 +01:00
tagcloud.xml Add ant build script 2013-03-15 12:12:58 +01:00

README.md

Example of TagCloud

TagCloud

Tag clouds are very popular but seem to look always the same. TagCloud allows you to generate tag cloud images which base on an input word list and a shape image. It will try to fill the shape with the provided words and thereby choose a font size according to the weights.

Shapes can be provided a simple image files which have a clear foreground shape. You also can configure the colors which are used randomly for the words in the tag cloud.

This project bases on the impressive work of Processing and WordCram. The generated images are inspired by the examples at Tagxedo.

Installation

  1. a) Clone this repository and build the jar, e.g.

     $ ant -f tagcloud.xml
    

    b) Or use a prebuild tagcloud.jar from /build

  2. Place the jar in an directory and provide the following files (Sample can be used from this project root directory):

     \
     - tagcloud.jar       
     - input.txt          The input file containing the words and weights
     - shape.png          The shape file
     - config.properties  The configuration for the generation process (see sample in repository)
    

Usage

Provide a input.txt with an entry per line in the following format: WORD,COUNT. The WORD should not contain any , as this is used as a separator.

Example: input.txt

acceptation, 5.0
acceptance, 1.0
appreciation, 2.0
recognition, 3.0
compliment, 1.0
acknowledgement, 1.5
praise, 6.3

You also must provide a shape.png image. It should have a white background and a black foreground. The image dimensions should match the configured result dimensions (see config.properties).

Example: shape.png

Example of shape.png

Your directory should also include a config.properties file for the generation process. See the included file as an example.

Now you can start the generation process with:

$ java -jar tagcloud.jar

Per default the generated image will be written to out.png. TIFF, TARGA, JPEG, and PNG format are supported by determine the extension of the configure output file.

Headless: This project uses Processing which cannot be run without a frame buffer. The -D java.awt.headless=true trick doesn't work. In the project repository a simple shell script is included with can be used to generate an image on headless machines using Xvfb.

TODO

  • Allow configuration with command line arguments

License

TagCloud is distributed under MIT license. See LICENSE for details.

The official Processing.org's jars, used as dependencies, are distributed under LGPL and their code can be found on http://processing.org/

The official WordCram's jars, also used as dependencies, are distributes under Apache License and their code can be found on http://wordcram.org