키 타입 교정 소프트 도카벤 커맨드
가이요
ls
잘 dokaben
이것은 모두가 안고 있는 그런 고민을 해소하기 위한 키 타입 교정 소프트입니다.다음은 실제로 치고 실수해 버린 경우의 모습입니다.
\데메타메타데메타테타/
소스 코드
Ruby로 썼습니다.
curses로 만들까라고 생각했습니다만, 이번은 손쉽게 이스케이프 시퀀스로 끝났습니다.
문자의 분은 수수하게 노력해 손수 만들었습니다.
특히 인스톨 등은 필요없고, 아래에 나타내는 코드를 실행하면 시작의 GIF와 같이 됩니다.
그리고는 커멘드로서 사용할 수 있도록(듯이) 각위 좋게 해 주세요.
DOKABEN = [
0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,
0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000078007e00e00700000001ff07ffe3f801c78000079e03ffe78fe3ffc0001f001fdfc001f00000000000000000000000000,
0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f8007c00e00f00000001f1c7ffe0f3c783000001f007ffe1f803e3800003ff07ffe7fe0007c00007fe03fbe7dfc3ffe0000f9e0ff7e78ff1ffc0001f041fffc303f0ff80003f001f9f8000f80000000000080c0000000000000000000000000000000,
0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000700000001f1407c00f007c2000003e3c7ffe0f143c1800003e587ffe1f941e1c00007f00fffe1fc01f1e00007ff0fffe7fe0003e00007fe0fffe7ff811fe0000ffe03f3e7cff1ffe0001f1c0ff7e78ff1ffe0001f0c3fffc307f8ffc0003e001fffc201f8ff00007e001f9f8000f800000000000e1e000018000000000000000000000000000000000000000000000,
0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000fc000003c0000007c680fc00f003e0c00007c58fffe0f1a1f0e0000fcf0fffe0f9e1f0f0000fc00fffe1fd20f8f0000ffe0fffe3fe00f8f0000ffe1fffe7ff0001f0001ffe1fffe7ffc1fff8001ffc03f7e7eff9fff0001f7c0ff7e7cff8fff0003e1c3fffe787f8fff0003e083fffc303f8ffc0003e003fffc201f87f00007e001f9f8000f8000000fe001e1f0000380000000000080c000000000000000000000000000000000000000000000000000,
0x0000000000000000000000000000000000000000000000000000000f000003f0001f8007000f800003f1a01f8007800f818003e1e1fffe0f8d8fc1c003e363fffe0fcd07c1c003f043fffe0fcf07c1e003f803fffe1fe003e3e003ffc3fffe3ff003e3e003ff83fffe7ff80007e003ff83fffe7ffc0fffe007ff807f7e7eff8fffc007ff80fe7e7c7fc7ffc007c787fefe7c7fc7ff8007c387fffc383fc7ff0007c107fffc301fc7fe000fc003fffc201f87f8000fc003f9f800078000000fc001f1f00003800000000001c1e00001800000000000000000000000000000000000000000000000000000000000000000,
0x00000000000000000000000000000000000000000000003f8000000fc00007e1403f80078007c08007e343bf9c078687c0e007c3c3fffe0fc787e0e007e6c3fffe0fcd83e0e007f003fffe1fed03e1e007f803fffe1fe003f1e007ff83fffe7ff00003e007ff83fffe7ffc0007e007ff82ff7e7ffe07ffe007ff807f7e7effc7ffe007df01fe7e7c7fc7ffc007c707fefe3c7fc7ffc00fc307fffc383fc7ff800fc107fffc301fc7fe000fc003fffc200fc7f0000fc003f9f80007c000001fc001e1f00003c00000000001c1e00000c00000000000000000000000000000000000000000000000000000000000000000,
0x00000000000000000000000000000000000000000000003f80000007e0001fc2c03f8007c007e0601fc6c7bffc07c6c3e0700fc787fffe07c6c3f0780fc587fffe0fe783f0f80fe007fffe1fe581f0f00fff07fffe3ff001f0f00fff03fffe7ff80001f00fff03fffe7ffc0007f00fff00ff7e7fff07fff00fff00fe7e7e7fe7fff00f9f01fe7e7c7fc7ffe00f8f0ffefe3c3fc7ffc00f8307fffc383fc7ff800f8107fffc301fc3fe000fc003fffc200fc3f8001fc003f1f80007c000001fc001e1f00003c00000000001c1e00000c00000000000000000000000000000000000000000000000000000000000000000,
0x00000000000000000000000000000000000000000000003f80000007e0001fc2c03f8007c007e0601fc6c7bffc07c6c3e0700fc787fffe07c6c3f0780fc587fffe0fe783f0f80fe007fffe1fe581f0f00fff07fffe3ff001f0f00fff03fffe7ff80001f00fff03fffe7ffc0007f00fff00ff7e7fff07fff00fff00fe7e7e7fe7fff00f9f01fe7e7c7fc7ffe00f8f0ffefe3c3fc7ffc00f8307fffc383fc7ff800f8107fffc301fc3fe000fc003fffc200fc3f8001fc003f1f80007c000001fc001e1f00003c00000000001c1e00000c00000000000000000000000000000000000000000000000000000000000000000,
0x00000000000000000000000000000000000000000000003f80000007e0001fc2c03f8007c007e0601fc6c7bffc07c6c3e0700fc787fffe07c6c3f0780fc587fffe0fe783f0f80fe007fffe1fe581f0f00fff07fffe3ff001f0f00fff03fffe7ff80001f00fff03fffe7ffc0007f00fff00ff7e7fff07fff00fff00fe7e7e7fe7fff00f9f01fe7e7c7fc7ffe00f8f0ffefe3c3fc7ffc00f8307fffc383fc7ff800f8107fffc301fc3fe000fc003fffc200fc3f8001fc003f1f80007c000001fc001e1f00003c00000000001c1e00000c00000000000000000000000000000000000000000000000000000000000000000,
0x00000000000000000000000000000000000000000000003f80000007e0001fc2c03f8007c007e0601fc6c7bffc07c6c3e0700fc787fffe07c6c3f0780fc587fffe0fe783f0f80fe007fffe1fe581f0f00fff07fffe3ff001f0f00fff03fffe7ff80001f00fff03fffe7ffc0007f00fff00ff7e7fff07fff00fff00fe7e7e7fe7fff00f9f01fe7e7c7fc7ffe00f8f0ffefe3c3fc7ffc00f8307fffc383fc7ff800f8107fffc301fc3fe000fc003fffc200fc3f8001fc003f1f80007c000001fc001e1f00003c00000000001c1e00000c00000000000000000000000000000000000000000000000000000000000000000,
0x00000000000000000000000000000000000000000000003f80000007e0001fc2c03f8007c007e0601fc6c7bffc07c6c3e0700fc787fffe07c6c3f0780fc587fffe0fe783f0f80fe007fffe1fe581f0f00fff07fffe3ff001f0f00fff03fffe7ff80001f00fff03fffe7ffc0007f00fff00ff7e7fff07fff00fff00fe7e7e7fe7fff00f9f01fe7e7c7fc7ffe00f8f0ffefe3c3fc7ffc00f8307fffc383fc7ff800f8107fffc301fc3fe000fc003fffc200fc3f8001fc003f1f80007c000001fc001e1f00003c00000000001c1e00000c00000000000000000000000000000000000000000000000000000000000000000,
0x00000000000000000000000000000000000000000000003f8000000fc00007e1403f80078007c08007e343bf9c078687c0e007c3c3fffe0fc787e0e007e6c3fffe0fcd83e0e007f003fffe1fed03e1e007f803fffe1fe003f1e007ff83fffe7ff00003e007ff83fffe7ffc0007e007ff82ff7e7ffe07ffe007ff807f7e7effc7ffe007df01fe7e7c7fc7ffc007c707fefe3c7fc7ffc00fc307fffc383fc7ff800fc107fffc301fc7fe000fc003fffc200fc7f0000fc003f9f80007c000001fc001e1f00003c00000000001c1e00000c00000000000000000000000000000000000000000000000000000000000000000,
0x0000000000000000000000000000000000000000000000000000000f000003f0001f8007000f800003f1a01f8007800f818003e1e1fffe0f8d8fc1c003e363fffe0fcd07c1c003f043fffe0fcf07c1e003f803fffe1fe003e3e003ffc3fffe3ff003e3e003ff83fffe7ff80007e003ff83fffe7ffc0fffe007ff807f7e7eff8fffc007ff80fe7e7c7fc7ffc007c787fefe7c7fc7ff8007c387fffc383fc7ff0007c107fffc301fc7fe000fc003fffc201f87f8000fc003f9f800078000000fc001f1f00003800000000001c1e00001800000000000000000000000000000000000000000000000000000000000000000,
0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000fc000003c0000007c680fc00f003e0c00007c58fffe0f1a1f0e0000fcf0fffe0f9e1f0f0000fc00fffe1fd20f8f0000ffe0fffe3fe00f8f0000ffe1fffe7ff0001f0001ffe1fffe7ffc1fff8001ffc03f7e7eff9fff0001f7c0ff7e7cff8fff0003e1c3fffe787f8fff0003e083fffc303f8ffc0003e003fffc201f87f00007e001f9f8000f8000000fe001e1f0000380000000000080c000000000000000000000000000000000000000000000000000,
0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000700000001f1407c00f007c2000003e3c7ffe0f143c1800003e587ffe1f941e1c00007f00fffe1fc01f1e00007ff0fffe7fe0003e00007fe0fffe7ff811fe0000ffe03f3e7cff1ffe0001f1c0ff7e78ff1ffe0001f0c3fffc307f8ffc0003e001fffc201f8ff00007e001f9f8000f800000000000e1e000018000000000000000000000000000000000000000000000,
0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f8007c00e00f00000001f1c7ffe0f3c783000001f007ffe1f803e3800003ff07ffe7fe0007c00007fe03fbe7dfc3ffe0000f9e0ff7e78ff1ffc0001f041fffc303f0ff80003f001f9f8000f80000000000080c0000000000000000000000000000000,
0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000078007e00e00700000001ff07ffe3f801c78000079e03ffe78fe3ffc0001f001fdfc001f00000000000000000000000000,
]
.map { |dokaben| dokaben.to_s(2).rjust(24*80, "0").scan(/.{1,80}/) }
.map { |dokaben| dokaben.map { |line| line.each_char.map { |pixel| pixel == "1" ? "\e[48;5;#{124}m \e[0m" : " " }.join }.join("\n") }
print "\e[?25l"
begin
DOKABEN.each do |dokaben|
print dokaben
print "\e[#{24}A"
STDOUT.flush
sleep 0.2
end
rescue Interrupt
print "\e[?25h"
exit 0
end while true
버섯
키노우 ① 루프 사이세이 카노우
혹은 루프 밖에 할 수 없다.
키노우 ② 석도 헨코 우카 노우
sleep 0.2
하고 있는 곳을 만지십시오.키노우③ 코마오토시후카노우
키노우 ④ 카이 텐지 키도 우후 카노
Q and A
Q. 왠지 표시가 무너진다
A. 도카벤의 문자를 표시하기 위해 할로와 폭을 요구합니다. 표시가 무너져 버리는 경우는 수고스럽지만, 단말을 최대화 하는지 문자를 작게 하는지 해 주세요.
Q. 루프가 멈추지 않는다
A.
Ctrl
+ C
로 강제 종료할 때까지 루프는 멈추지 않습니다.오시마이
참고
sm29720917
sm30220788
CSS로 재현하는 도카벤 OP의 문자 효과
Reference
이 문제에 관하여(키 타입 교정 소프트 도카벤 커맨드), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/seinosuke/items/820c2dcfde4d1455520d텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)