https://github.com/evant/res
Commandline res manager for android
https://github.com/evant/res
Last synced: over 1 year ago
JSON representation
Commandline res manager for android
- Host: GitHub
- URL: https://github.com/evant/res
- Owner: evant
- License: mit
- Created: 2017-08-10T02:54:50.000Z (almost 9 years ago)
- Default Branch: main
- Last Pushed: 2020-06-14T22:51:18.000Z (about 6 years ago)
- Last Synced: 2025-01-05T09:44:21.073Z (over 1 year ago)
- Language: Rust
- Size: 5.86 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
### Res
A tool for managing android resources.
### Usage
#### Listing
You drawables
```
res ls drawable app/src/main/res
image1.png mdpi hdpi xhdpi
image2.png hdpi xhdpi
```
Your layouts
```
res ls layout app/src/main/res
activity_main.xml
fragment_overview.xml land
fragment_detail.xml land sw600dp
```
#### Copying/Moving
Say you have a source directory that looks like
```
source/
drawable-mdpi/
image1.png
image2.png
drawable-hdpi/
image1.png
image2.png
drawable-xhdpi/
image1.png
image2.png
```
and the destination `app/main/res/`
```
res cp drawable source/image1.png app/main/res
```
copies just `image1.png` to `app/main/res/drawable-*`
```
res cp drawable source/image1.png app/main/res/new_image.png
```
copies and renames `image1.png` to `new_image.png`
```
res mv drawable source/image1.png app/main/res
```
moves `image1.png`
#### Invalid Character Replacement
All file names will be made valid by striping/replacing invalid characters.
* uppercase will be converted to lowercase
* `.`, `-`, and ` ` will be converted to `_`
For example,
```
res cp drawable "source/My Badly-named Image.png" app/main/res
```
will convert the name to `my_badly_named_image.png`