mirror of
https://github.com/jiro4989/rect
synced 2026-01-03 02:24:40 +00:00
No description
| docs | ||
| src | ||
| tests | ||
| .gitignore | ||
| .travis.yml | ||
| appveyor.yml | ||
| LICENSE | ||
| README.adoc | ||
| rect.nimble | ||
: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