npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

droidscale

v0.9.3

Published

Fast Android Asset Conversion

Readme

#DroidScale

Fast Android Asset Conversion. Currently supports SVG as Input File Format using Inkscape CLI for image conversion. It reads a folder containing *.svg icons, creates the suiting folder structure and converts all icons to all Android Display Densities.

More Information on Android Iconography: http://developer.android.com/design/style/iconography.html

##DroidScale in Action

Imagine your icon folder:

icon_folder/
   finished_asset.svg

But for Android Development, you'll need this asset in PNG Format and in 5 different sizes...

Here DroidScale comes in:

droidscale -i icon_folder -o output_folder

Creates the following Directory Structure:

output_folder/
    drawable-mdpi/...
        finished_asset.png /*48x48px icons*/
    drawable-hdpi/...
        finished_asset.png /*72*72px icons*/
    drawable-xhdpi/...
        finished_asset.png /*96x96px icons*/
    drawable-xxhdpi/...
        finished_asset.png /*144x144px icons*/
    drawable-xxxhdpi/...
        finished_asset.png /*192x192px icons*/

voilà: All your icons, perfectly prepared!

##System Requirements:

  • Node.js > 0.10
  • Inkscape installed and available in your path (try which inkscape)

##Usage

Usage: droidscale [options]

  Options:

    -h, --help               output usage information
    -V, --version            output the version number
    -f, --filetype [type]    Input file type; supported: svg; defaults to: svg
    -i, --input [folder]     Folder with all images
    -o, --output [folder]    Specify the output folder. If it does not exist, it will be created
    -b, --basesize <pixels>  Base size for mdpi devices in pixels, default 48 results in 48px x 48px icons

##Performance:

DroidScale always launches as many Instances of Inkscape in parallel as you have cores.

For ~1250 SVG Icons, resulting in about 6250 Conversions I needed about 300 seconds.

##Developing an own ConversionCommand

This is fairly easy. You just have to add a property to the commands Object. Name this propery like the file extension you want to open with(of course without the dot!). Now set the value of the property to your command. You can use the following variables:

  • %INPUT% will be replaced by the path of the input file
  • %SIZE% will be replaced by the selected size(without units)
  • %OUTPUT% will be replaced by the path of the target file

For Example: If you want to replace *.tiff Files, and your command looks like this your-cli -size=48x48 -in=/path/to/source.tiff -out=/path/to/output.png your porperty would look like this:

"tiff": "your-cli -size=%SIZE%x%SIZE% -in=%INPUT% -out=%OUTPUT%"

##F.A.Q

  • Is it possible to use another CLI than the inkscape one?
    • Yes! Just specify your command in the commands object, look at the Inkscape CLI as an example
  • Why do you use Inkscape and not ImageMagick?
    • ImageMagick always blurs my image, so I defaulted to Inkscape. Also Inkscape has a switch to just export the drawn lines, not the whole canvas.