No description
Find a file
2019-07-24 22:49:52 +09:00
docs 💡 コメント書いたりドキュメント書いたり 2019-05-24 17:11:07 +09:00
src 💡 バージョンの出力書式を変更 2019-07-24 22:46:04 +09:00
tests メイン処理実装した 2019-05-24 14:05:36 +09:00
.gitignore ♻️ モジュール構成を変更 2019-05-24 10:31:29 +09:00
.travis.yml 🔧 リリースの設定を変更 2019-07-24 22:49:52 +09:00
appveyor.yml 🐛 artifacts 2019-05-24 17:36:53 +09:00
LICENSE 🎉 init commit 2019-04-03 20:40:49 +09:00
README.adoc 📝 ドキュメント 2019-05-24 17:24:00 +09:00
rect.nimble 💡 バージョンの出力書式を変更 2019-07-24 22:46:04 +09:00

:toc: left
:sectnums:

= rect

image:https://travis-ci.org/jiro4989/rect.svg?branch=master["Build Status", link="https://travis-ci.org/jiro4989/rect"]
image:https://ci.appveyor.com/api/projects/status/eex856fcv9lfgbjr?svg=true["Build status", link="https://ci.appveyor.com/project/jiro4989/rect"]

rect is a command to crop/paste rectangle text.

== Development

nim -v

  Nim Compiler Version 0.19.4 [Linux: amd64]
  Compiled at 2019-02-01
  Copyright (c) 2006-2018 by Andreas Rumpf

  git hash: b6d96cafc8bcad1f3d32f2910b25cd11a93f7751
  active boot switches: -d:release


nimble -v

  nimble v0.9.0 compiled at 2018-10-27 18:10:03
  git hash: couldn't determine git hash


== Usage

[source,bash]
----
% cat tests/data1.txt 
1234
あいうえお
6

% rect crop -x 2 -W 10 -H 2 tests/data1.txt
34
いうえお

% cat tests/data1.txt | rect crop -x 2 -W 10 -H 2
34
いうえお

% rect paste -x 6 -y 1 <(seq 4 | xargs -I@ bash -c 'seq 5 | xargs -I__ echo -n @; echo') tests/data1.txt
1234
あいう11111
6     22222
      33333
      44444

% seq 4 | xargs -I@ bash -c 'seq 5 | xargs -I__ echo -n @; echo' | rect paste -x 1 -y 2 tests/data1.txt
1234
あいうえお
611111
 22222
 33333
 44444
----

== Install

[source,bash]
nimble install rect

or

Download binary from https://github.com/jiro4989/rect/releases[Releases].

== Help

[source]
----
rect is a command to crop/paste rectangle text

Usage:
  rect crop  [options]
  rect crop  [options] <srcfile>
  rect paste [options] <dstfile>
  rect paste [options] <srcfile> <dstfile>
  rect (-h | --help)
  rect (-v | --version)

Options:
  -h --help               Show this screen
  -v --version            Show version
  -X --debug              Debug mode ON
  -x <x>                  Cropping/pasting position X [default: 0]
  -y <y>                  Cropping/pasting position Y [default: 0]
  -W --width <width>      Cropping width              [default: 1]
  -H --height <height>    Cropping height             [default: 1]
----

== License

MIT

== Document

* https://jiro4989.github.io/rect/rect.html