longcatのオプションメモ

[mattn/longcat]のオプションまとめ

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/278919/2a20defb-2359-cc54-3dee-77087ef8c27a.png)

## インストール

```bash
$ go get github.com/mattn/longcat
```

## オプション一覧

`longcat [-h][-n,l int][-i float64][-r,R,H][-o filepath][-d dirpath][-t themename][-help][-themes][-pixterm][-dark][-ascii]`

### `-h, help`

- Usageを見る

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/278919/ddb27d9b-df75-8f47-8c2a-aaa53e1dc345.png)

### `-n int`

- how long cat
- 長さ指定(<-5でエラー)
- def: 1

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/278919/1a9370ff-6936-b3c4-05d1-6e15e8a18dab.png)

### `-l int`

- number of columns
- 横に並ぶ数指定
- def: 1

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/278919/40f78780-4dbb-b9c3-82ce-7354aca17539.png)

### `-i float64`

- rate of intervals
- lオプションを使用した際のカラム同士の幅を指定
- def: 1.0

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/278919/2d1b2256-bf24-2dcc-cb6e-7933b6156cb2.png)

### `-r`

- flip holizontal
- 横に反転(左右反転)
- def: false

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/278919/feb1795d-f2a5-3c0e-27fb-0f33b2207e76.png)

### `-R`

- flip vertical
- 縦に反転
- def: false

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/278919/731f9926-1746-f045-fcd0-db133be07e3d.png)

### `-H`

- holizontal-mode
- 左90°回転
- def: false

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/278919/bbf8e119-ea40-25d2-e785-3d587f838203.png)

### `-o filepath`

- output image file
- 出力を引数のファイルに行う(PNGのバイナリを書き込み)
- def: null(端末上に出力)

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/278919/3c18fba9-b852-5c85-61dc-c0b1c120c007.png)
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/278919/77e888c8-e941-3c4d-8d97-af4440e58c8e.png)

### `-d dirpath`

- directory of images(dir/*{1,2,3}.png))
- 頭(1.png), 腹(2.png), 尾(3.png)の画像を含むディレクトリを指定
- def: null(テーマに対応するディレクトリを走査)

### `-t themename`

- name of theme
- テーマの指定
- def: longcat

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/278919/335cd7a1-e88b-a245-4ddd-3366297b73c6.png)

### `-themes`

- list themes
- 使用可能なテーマの一覧を表示。
- def:false

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/278919/5e400ddc-cf83-77e9-cd58-eacdbe43bca7.png)

### `-pixterm`

- pixterm mode
- pixtermを使用しASCII文字で端末上に画像を出力
- def: false(sixelを使用し出力)

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/278919/f53eb5ff-5960-3583-8215-0a868359b8eb.png)

### `-dark`

- dark-mode(a.k.a. tacgnol theme)
- `-t tacgnol`と同じ
- def: false

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/278919/53678489-0a1b-4b3d-75ea-32df0645d82c.png)

### `-ascii`

- ascii mode
- AA(`/[ ',.037:;KOX\[cdklmox]/`のみ)で表示
- def: false

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/278919/049287cf-1d72-5b14-3e47-d1168eefe142.png)

---

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/278919/0d88d39a-8029-7a2d-bbaf-d1dcabf10fd2.png)

<blockquote class="twitter-tweet"><p lang="und" dir="ltr"><a href="https://t.co/0KERTmt4a9">https://t.co/0KERTmt4a9</a> <a href="https://t.co/T6ZPxXPkiu">pic.twitter.com/T6ZPxXPkiu</a></p>&mdash; シェル芸bot (@minyoruminyon) <a href="https://twitter.com/minyoruminyon/status/1281690860480946176?ref_src=twsrc%5Etfw">July 10, 2020</a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>


↑クリックする度に猫が動いてかわいい

[mattn/longcat]: https://github.com/mattn/longcat