Skip to content

Commit

Permalink
Added sortLines.js
Browse files Browse the repository at this point in the history
  • Loading branch information
sky-chaser-high committed Mar 17, 2024
1 parent d75cbed commit 0e922c0
Show file tree
Hide file tree
Showing 4 changed files with 546 additions and 9 deletions.
45 changes: 36 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ If you find a script that interests you, please download it from [![Download](ht
- [Justify Content Space Between](#justifyContentSpaceBetweenjs)
- [Move Line Down](#moveLineDownjsmoveLineUpjs)
- [Move Line Up](#moveLineDownjsmoveLineUpjs)
- [Sort Lines](#sortLinesjs) `New`
- [Split Text](#splitTextjs)
- [Split Text at Cursor Position](#splitTextAtCursorPositionjs)
- [Swap Text Contents](#swapTextContentsjs)
Expand Down Expand Up @@ -638,7 +639,7 @@ Illustrator CS4 or higher
# <a name="createThreadedTextjs">createThreadedText.js</a>
[![Download Text.zip](https://img.shields.io/badge/Download-Text.zip-e60012)](https://github.com/sky-chaser-high/adobe-illustrator-scripts/releases/latest/download/Text.zip)
This script creates a threaded text. It can also be made from a mixture of point types and path objects.
Vertical text is also supported.
The vertical text is also supported.

![Create Threaded Text](images/createThreadedText.png)

Expand Down Expand Up @@ -1390,8 +1391,7 @@ Illustrator CS or higher

# <a name="justifyContentSpaceBetweenjs">justifyContentSpaceBetween.js</a>
[![Download Text.zip](https://img.shields.io/badge/Download-Text.zip-e60012)](https://github.com/sky-chaser-high/adobe-illustrator-scripts/releases/latest/download/Text.zip)
This script adjusts tracking to align point texts at both ends.
Vertical text is also supported.
This script adjusts tracking to align point texts at both ends. The vertical text is also supported.

![Justify Content Space Between](images/justifyContentSpaceBetween.png)

Expand Down Expand Up @@ -2055,10 +2055,39 @@ Illustrator CS5 or higher



# <a name="sortLinesjs">sortLines.js</a>
[![Download Text.zip](https://img.shields.io/badge/Download-Text.zip-e60012)](https://github.com/sky-chaser-high/adobe-illustrator-scripts/releases/latest/download/Text.zip)
This script sorts lines of the text. The vertical text is also supported.

![Sort Lines](images/sortLines.png)

### Usage
1. Select either the text objects or the lines to be sorted, and run this script.
2. Check the Match Case checkbox to make the text case-sensitive.
3. Check the Entire Threaded Text checkbox to sort the entire threaded text.
4. Click one of the sort buttons below.
`A → Z` Sort in A to Z order.
`Z → A` Sort in Z to A order.
`Reverse` Sort in reverse order.

> **Note**
> Wrapped lines in the area type split on each line.
> If the selection spans next threads, it cannot be sorted.
> Type on a paths are not supported.
### Requirements
Illustrator CS4 or higher

<div align="right">[ <a href="#text">↑ Back to Top ↑</a> ]</div>
<br>





# <a name="splitTextjs">splitText.js</a>
[![Download Text.zip](https://img.shields.io/badge/Download-Text.zip-e60012)](https://github.com/sky-chaser-high/adobe-illustrator-scripts/releases/latest/download/Text.zip)
This script splits a point text by lines, words, or characters.
Vertical text is also supported.
This script splits a point text by lines, words, or characters. The vertical text is also supported.

![Split Text](images/splitText.png)

Expand All @@ -2083,8 +2112,7 @@ Illustrator CS4 or higher

# <a name="splitTextAtCursorPositionjs">splitTextAtCursorPosition.js</a>
[![Download Text.zip](https://img.shields.io/badge/Download-Text.zip-e60012)](https://github.com/sky-chaser-high/adobe-illustrator-scripts/releases/latest/download/Text.zip)
This script splits a point text at the cursor position.
Vertical text is also supported.
This script splits a point text at the cursor position. The vertical text is also supported.

![Split Text at Cursor Position](images/splitTextAtCursorPosition.png)

Expand Down Expand Up @@ -2198,8 +2226,7 @@ Illustrator CS or higher

# <a name="textAlign_CenterjstextAlign_LeftjstextAlign_Rightjs">textAlign_Center.js<br>textAlign_Left.js<br>textAlign_Right.js</a>
[![Download Text.zip](https://img.shields.io/badge/Download-Text.zip-e60012)](https://github.com/sky-chaser-high/adobe-illustrator-scripts/releases/latest/download/Text.zip)
This script changes the text alignment without moving the position.
Vertical text is also supported.
This script changes the text alignment without moving the position. The vertical text is also supported.

For example, textAlign_Center.js:
![Text Align](images/textAlign.png)
Expand Down
33 changes: 33 additions & 0 deletions README_ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ Adobe Illustratorのスクリプト集です。
- [**スレッドテキストを作成**](#スレッドテキストを作成) createThreadedText.js
- [**選択なしでカット**](#選択なしでカット選択なしでコピー) cutLine(emptySelection).js
- [**選択なしでコピー**](#選択なしでカット選択なしでコピー) copyLine(emptySelection).js
- [**テキストの並べ替え**](#テキストの並べ替え) sortLines.js `New`
- [**テキスト中央揃え**](#テキスト中央揃えテキスト左揃えテキスト右揃え) textAlign_Center.js
- [**テキスト左揃え**](#テキスト中央揃えテキスト左揃えテキスト右揃え) textAlign_Left.js
- [**テキスト右揃え**](#テキスト中央揃えテキスト左揃えテキスト右揃え) textAlign_Right.js
Expand Down Expand Up @@ -2172,6 +2173,38 @@ Illustrator CS5以降



## <a name="テキストの並べ替え">テキストの並べ替え</a>
[![Download Text.zip](https://img.shields.io/badge/Download-Text.zip-e60012)](https://github.com/sky-chaser-high/adobe-illustrator-scripts/releases/latest/download/Text.zip)
### sortLines.js
テキストの行を並べ替えます。縦組みのテキストにも対応しています。

![Sort Lines](images/sortLines.png)
> **Note** Illustrator日本語版を使用している場合は、UIは日本語で表示します。
#### 使用方法
1. 並べ替えるテキストまたは行を選択してスクリプトを実行します。
2. アルファベットの大文字と小文字を区別する場合は、[大文字と小文字を区別]にチェックを付けます。
3. スレッドテキスト全体を並べ替えるには、[スレッド全体を並べ替え]にチェックを付けます。
4. 以下の並べ替えボタンのいずれかをクリックします。
`A → Z` 昇順に並べ替えます。
`Z → A` 降順に並べ替えます。
`逆順` 逆順に並べ替えます。

> **Note**
> エリア内文字で折り返された行は各行で分割します。
> テキストの選択範囲が次のスレッドにまたがる場合は、並べ替えできません。
> パス上文字には対応していません。
#### 動作条件
Illustrator CS4以降

<div align="right">[ <a href="#テキスト">↑ トップへ戻る ↑</a> ]</div>
<br>





## <a name="文字列を分割">文字列を分割</a>
[![Download Text.zip](https://img.shields.io/badge/Download-Text.zip-e60012)](https://github.com/sky-chaser-high/adobe-illustrator-scripts/releases/latest/download/Text.zip)
### splitText.js
Expand Down
Binary file added images/sortLines.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 0e922c0

Please sign in to comment.