Skip to main content

A simple android assets generator

Project description

android-asset-generator


Description

android-assset-generator is a command line program for generate ldpi, mdpi, hdpi, xhdpi, xxhdpi and xxxhdpi density images for your Android Studio Project.

What's new on v1.0.6?
  • Now you can use relative paths.

Requeriments


Installing

   pip install android-asset-generator

Usage

  • Prepare a folder that contains only the images you want to convert to the different densities or may be a single image file.

  • Run the following command.

     android-asset-generator  path   density
    
Argument Description Valid Values
path Full or relative path string of your asset folder or asset file (png or jpg). Set "this" if your console current workspace is the asset folder. If your path contains spaces, use quotation marks ( " ). Example: "C:\Users\MyUser\Pictures\Camera Roll\pp.jpg" C:\Users\MyUser\Desktop\img or C:\Users\MyUser\Desktop\img\image1.png or src/asset/image1.png
density The source density. If your images are mdpi, set mdpi as argument ldpi, mdpi, hdpi, xhdpi, xxhdpi or xxxhdpi

Note: Preferably do not change the order of the arguments.

  • The generated images will be saved in different folders within the specified path following the Android Studio standard: drawable-ldpi drawable-mdpi drawable-hdpi drawable-xhdpi drawable-xxhdpi drawable-xxxhdpi

  • The source images will be moved to the corresponding folder without having suffered alterations.

  • The last step is to import the generated folders to your Android Studio. project


Examples

    android-asset-generator C:\Users\MyUser\Desktop\img xhdpi

The asset folder path is C:\Users\MyUser\Desktop\img and asset density is xhdpi

    android-asset-generator "C:\Users\MyUser\Pictures\Camera Roll\pp.jpg"  xhdpi

The file path contains spaces in between, so quotes are used to make it a single string

    android-asset-generator this

The asset folder path is the console current directory and asset density is hdpi by default

    android-asset-generator img/photo.png

The asset folder path is a relative path starting at the current console working directory.


Compatibility

Operating System Test Results
Windows 10 Passed
MacOS Testing
Linux Testing

Your test results are welcome!


Repositories

GitHub

android-asset-generator

PyPI

android-asset-generator

You are welcome if you want to colaborate!


Licence

The project is licensed under the MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

android-asset-generator-1.0.6.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

android_asset_generator-1.0.6-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file android-asset-generator-1.0.6.tar.gz.

File metadata

  • Download URL: android-asset-generator-1.0.6.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.6

File hashes

Hashes for android-asset-generator-1.0.6.tar.gz
Algorithm Hash digest
SHA256 bd71997955a2f0d0c1535131d3ccc8dc2da47b88d691309aad338354fa26e666
MD5 e5744b1efa637e2d6753e1b60ce0778c
BLAKE2b-256 09d575740c8941f47c2cc862e0174a5c02a35926895a0b286a43fde1a3bb6898

See more details on using hashes here.

File details

Details for the file android_asset_generator-1.0.6-py3-none-any.whl.

File metadata

  • Download URL: android_asset_generator-1.0.6-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.6

File hashes

Hashes for android_asset_generator-1.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 cc0ff088635bb005e43e7518e3d65a1ece2e3c66c1bf5bc92197a12bbb8715ac
MD5 e1e79d557c644ba803a823463ff50f3b
BLAKE2b-256 348d2bb6e956f52dd98f9eed417a04e8ce4a8c34cf90d254ff685697cc3955d9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page