android-icon-copier


Source link: https://github.com/lucastan/android-icon-copier

What is this

A commandline tool to copy Android Material Design and FontAwesome icons to your project folders: drawable-ldpi, drawable-mdpi, and etc.

How it works

It downloads from these repos:

Resolution supported


 | l | m | h | xh | xxh | xxxh | 

--------|---|---|---|----|-----|------| FA | Y | Y | Y | Y | Y | - | Classic | - | Y | Y | Y | Y | - | Material| - | Y | Y | Y | Y | Y |

Sizes supported

Material: 18, 24, 36, 48 dp. FA and Classic: 32 dp only.

Usage

Usage: Material

: ./copy {
proj path
}
 {
category
}
 {
color
}
 {
icon name
}
 [size] Classic and FA: ./copy {
proj path
}
 {
fa/classic
}
 {
color
}
 {
icon name
}
 

[] denotes optional args. Args are case sensitive!

  • proj path: Path to project folder relative to base path.
    • base path can be defined in options file (see below).
    • Auto-detects new or old project structure: MyProject/src/main/res or MyProject/res.
  • category: Either "classic", "fa", or Material category.
  • color: Color of icon: Either "white", "grey" or "black".
    • For Classic and FA, "white" refers to the Holo Dark theme (dark background). "Grey" refers to the Holo Light theme.
    • For Material, "grey" refers to grey600.
  • icon name: Name of icon (must replace spaces and dashes with underscores).
    • Without any prefix. Examples: FontAwesome "thumbs_up", Classic "search".
  • size (integer): for Material only, Size in dp, defaults to 24 which is the action bar icon size for material design.

Examples

  • ./copy MyProject maps white place
    • Downloads to `BasePath/MyProject/{ src/main } /res/drawable-{ m,h,xh,xxh,xxh } dpi
  • ./copy MyProject maps white place 48
  • ./copy Path/to/MyProject fa grey thumbs_up

Windows users need to use python copy instead (I think).

Filename mapping

The tool also supports filename mapping of destination png files. (see options) Mapping vars:

  • cat: category
  • name: name as specified in commandline.
  • color: color as specified: white, black, grey.
  • size: integer only.
  • bg: derived from color. black => bright, white => dark, grey => light.
  • bgSuffix: "_dark" if bg is dark else empty string.

Options file

Named options.json in same dir. Sample:

{

  "basePath": "~/Documents",
  "filenameMap": {

"classic": "ic_action_{
name
}
{
bgSuffix
}
.png",

"fa": "ic_action_fa_{
name
}
{
bgSuffix
}
.png",

"material": "ic_{
name
}
_{
color
}
_{
size
}
dp.png"
  
}
 
}

~ is expanded to the user home dir.

./copy Path/to/MyProject fa white thumbs_up results in the target filename of ic_action_fa_thumbs_up_dark.png.

Installation

  • Python >= 2.7 (older or newer ver might work, you may try.)
  • Python Requests package: pip install requests
  • Git clone this repo or download the script.

Icon cheatsheet

License

This project is under the MIT License. (see LICENSE)

Please refer to the respective icon library for its licensing info.

Resources

This library allows you to create a shadow effect for your layout based on your child.

Simple chart for Android.

Animations for support.v4.Fragment transitions.

A 3D Touch API for Android.

This library creates a notification with prompt. When user click, it opens a transparent Activity with request to permission.

Library to easily add swipe-to-open functionality to any RecyclerView.

Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes