Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/danabeknar/taza
๐งผ keep your iOS project clean
https://github.com/danabeknar/taza
swift swift-cli swift-package-manager
Last synced: 25 days ago
JSON representation
๐งผ keep your iOS project clean
- Host: GitHub
- URL: https://github.com/danabeknar/taza
- Owner: danabeknar
- Created: 2020-08-18T05:54:25.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-10-09T13:33:47.000Z (about 4 years ago)
- Last Synced: 2024-02-15T12:34:45.644Z (10 months ago)
- Topics: swift, swift-cli, swift-package-manager
- Language: Swift
- Homepage:
- Size: 325 KB
- Stars: 49
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-made-in-kz - Taza
README
# Taza ๐งผ
![Swift](https://img.shields.io/badge/Swfit-5.0-orange.svg)
[![@beknar](https://img.shields.io/badge/contact-%40beknar-brightgreen.svg)](https://t.me/beknar)Trivial command-line tool build in educational purposes & for personal use.
Allows to easily find unused resources in XCode project.## How it works
1. A script looks for images. For now it supports 4 types: *.pdf, .png, .img, .jpg*;
2. It finds image-containable file. There are 4 types as well: *.swift, .m, .xib, .storyboard*;
3. Then it loops through images and files, checking if a file contains an image. The checking depends on the file extension:
- If it's `.swift` file, the script searches `UIImage(named: "imageName")` & `UIImage(named: "imageName.extension")` occurences;
- If it's `.m` file, the script searches `[UIImage imageNamed:@"imageName"]` & `[UIImage imageNamed:@"imageName.extension"]` occurences;
- If it's `.xib`/`.storyboard` file, the script searches `image="imageName"` & `image="imageName.extension"` occurences;
4. If the script could find unused image in these files, it prints them in a good-looking way:
![Result](https://raw.github.com/danabeknar/taza/develop/Resources/taza.png)## Installation
The easiest way to install Taza is using Swift Package Manager:
```bash
$ git clone https://github.com/danabeknar/taza
$ cd taza
$ swift build --configuration release
$ cp -f .build/release/taza /usr/local/bin/taza
```## Usage
Without any specifications (have to be executed in the directory where Xcode project is located):
```bash
taza
```
Specifies path of project to search for:
```bash
taza --path ~/Example
```Specifies should script list all found files:
```bash
taza --listFiles
```Specifies should script list all found resources:
```bash
taza --listResources
```
Or altogether:
```bash
taza --path ~/Example --listFiles --listResources
```To Do:
-------
- [x] Search specific directory
- [x] List files
- [x] List resources
- [x] Ignore pods
- [ ] Removing images## Dependencies
- [Files](https://github.com/JohnSundell/Files)
- [ColorizeSwift](https://github.com/mtynior/ColorizeSwift)
- [Commander](https://github.com/kylef/Commander)## Help, feedback or suggestions?
Feel free to contact me on [Telegram](http://t.me/beknar "Telegram") for discussions, news & announcements about Taza & other projects.