# 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">

- **Sort Artboards** - 按画板所在的x,y坐标给画板排序，并给画板加上顺序前缀
- **Sort Artboards Without Numbers** - 排序画板，但不加数字前缀
- **Rename Layers** - 美化图层名，并根据图层所应用的文字、图层样式，或所隶属的symbol重名图层（全局）

## 安装方法

### 直接下载

1. [下载ZIP包](https://github.com/canisminor1990/sketch-name-organizer/archive/master.zip) 解压
2. 打开 **NameOrganizer.sketchplugin** 即可自动安装

### 使用 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>

### 使用 Runner 安装

1. <kbd>⌘</kbd> + <kbd>'</kbd> 打开 **Runner**;
2. 切换至 **install** 标签;
3. 输入 **NameOrganizer**;
4. 选择 **Name Organizer** 并 <kbd>回车</kbd>.

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

## 示范

### Name Organizer

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

使用 <kbd>⌃</kbd> + <kbd>⌘</kbd> + <kbd>N</kbd> 打开插件弹窗

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

### Sort Artboards

按画板所在的x,y坐标给画板排序，并给画板加上顺序前缀 (格式为 01:图层名),
然后按顺序重新排列画板

<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

美化图层名，并根据图层所应用的文字、图层样式，或所隶属的symbol重名图层（全局）

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

### Name Format

使用驼峰命名化美化图层名，并处理好空格

### 使用Runner开启

1.<kbd>⌘</kbd> + <kbd>'</kbd> 打开 **Runner**;
2. 输入 **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
```

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