Overview

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/):

    LDPI, MDPI, HDPI, XHDPI and XXHDPI

    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

TODO

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

Author

Károly Kiripolszky <karcsi AT ekezet.com>

Website: ekezet.com

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.