1. 3k
  2. dragee


dragee - Drawable generator toolkit

This is a toolkit to help generate graphical assets for an Android application.

To build the sample sources edit project path in src/manifest.sample.json to match your configuration, then type:

./dragee.py -v build -x -o -r src/manifest.sample.json

This does the following:

  1. -x: Clean: remove recently generated files

  2. -o: Rasterize SVG to PNG using Inkscape (in gen/)

  3. -r: Make scaled versions for these densities (in build/):


    Note: This also does image optimization.

If you would like to copy the generated images to their respective directory in res/drawable then use the following command:

./dragee.py -v build -c src/manifest.sample.json

If you'd like to work with a certain file defined in the manifest:

./dragee.py -v build -s vd_logo -c src/manifest.sample.json

This will read the path to your project path from the manifest file and copy the assets to the res/drawable-<DENSITY> (if you have previously successfully compiled and resized them).

For help on commands and options use:

./dragee.py -h
or: ./dragee.py {command} -h
(eg. ./dragee.py build -h)

To use dragee you may need to first add executable permission:

chmod a+x dragee.py

Requirements to build

You need to have the following software on your system:

  • ImageMagick
  • Inkscape
  • OptiPNG
  • Python3


  • Customization of paths, commands and dimensions (scale groups) to make dragee a more generalized tool.


Károly Kiripolszky <karcsi AT ekezet.com>

Website: ekezet.com