# Name Organizer


[![GitHub release](https://img.shields.io/github/release/canisminor1990/sketch-name-organizer.svg?maxAge=2592000)](https://github.com/canisminor1990/sketch-name-organizer/releases) 
[![GitHub release](https://img.shields.io/badge/Works%20with-Sketch%20Runner-blue.svg?colorB=308ADF)](http://bit.ly/SketchRunnerWebsite)

<img src="https://raw.githubusercontent.com/canisminor1990/sketch-name-organizer/master/src/Img/rm-banner.png" width="520">

- [中文说明](README_zh.md)

- **Sort Artboards** - Rename artboards based on their x and y position, then sort them.
- **Sort Artboards Without Numbers** - Sort artboards without add number prefix.
- **Rename Layers** - Rename all layers based on their Style, TextStyle or MasterSymbol.

## Installing Plugins

### Direct download

1. [Download the ZIP file](https://github.com/canisminor1990/sketch-name-organizer/archive/master.zip) and unzip
2. Open the **NameOrganizer.sketchplugin**

### Install with Sketchpacks

<a href="https://sketchpacks.com/canisminor1990/sketch-name-organizer/install"><img src="https://sketchpacks-com.s3.amazonaws.com/assets/badges/sketchpacks-badge-install.png" alt="Install sketch-name-organizer with Sketchpacks" width="160"></a>

### Install with Runner

1. Press <kbd>⌘</kbd> + <kbd>'</kbd> open **Runner** window;
2. Switch to **install** tab;
3. Type **NameOrganizer**;
4. Select **Name Organizer** item and press <kbd>Return</kbd>.

<a href="http://bit.ly/SketchRunnerWebsite"><img src="http://bit.ly/RunnerBadgeBlue" width="160"></a>

## Usage

### Name Organizer

<img src="https://raw.githubusercontent.com/canisminor1990/sketch-name-organizer/master/src/Img/rm-dialog.png" width="344">

Press <kbd>⌃</kbd> + <kbd>⌘</kbd> + <kbd>N</kbd> on keyboard to callout the plugin dialog.

<img src="https://raw.githubusercontent.com/canisminor1990/sketch-name-organizer/master/src/Img/rm-shortkey.png" width="344">


### Sort Artboards

Add number prefixs to artboards based on their x and y positon (with format like 01:ArtboardsName),
then sort the artboards 01->99.

<img src="https://raw.githubusercontent.com/canisminor1990/sketch-name-organizer/master/src/Img/rm-usage01.png" width="720">

<img src="https://raw.githubusercontent.com/canisminor1990/sketch-name-organizer/master/src/Img/rm-usage02.png" width="720">


### Rename Layers

Rename all layers based on their Style, TextStyle or MasterSymbol and format them.

<img src="https://raw.githubusercontent.com/canisminor1990/sketch-name-organizer/master/src/Img/rm-usage03.png" width="720">

### Name Format

Format the name string with Camel-Case and beautify the spacing

### Run with Runner

1. Press <kbd>⌘</kbd> + <kbd>'</kbd> open **Runner** window;
2. Type **name**;

<img src="https://raw.githubusercontent.com/canisminor1990/sketch-name-organizer/master/src/Img/rm-run.png" width="344">

- **Input**
```
data display / Cell/01
```
- **Output**
```
DataDisplay / Cell / 01
```

## Contact
- **Author** - [Canis Minor](https://github.com/canisminor1990)
- **Email** - <i@canisminor.cc>
