From 29f85d8c17cd43a0637055e09ffb595e6b7c3a3c Mon Sep 17 00:00:00 2001 From: Ville Rantanen Date: Wed, 15 Jun 2016 11:51:34 +0300 Subject: [PATCH] update ansi drawing --- bin/srcframes2ans | 1 + reporting/srcframes2ans | 18 ++++++++++++++---- vim/ansi.vim | 3 ++- 3 files changed, 17 insertions(+), 5 deletions(-) create mode 120000 bin/srcframes2ans diff --git a/bin/srcframes2ans b/bin/srcframes2ans new file mode 120000 index 0000000..bc6923d --- /dev/null +++ b/bin/srcframes2ans @@ -0,0 +1 @@ +../reporting/srcframes2ans \ No newline at end of file diff --git a/reporting/srcframes2ans b/reporting/srcframes2ans index 0857f38..a9fb836 100755 --- a/reporting/srcframes2ans +++ b/reporting/srcframes2ans @@ -74,7 +74,7 @@ class bc: CLREND = '\033[K' CLRSCR = CLR+"\033[0;0H" - color_keys="PQWERTYU01234567XCZV;asdfghj)!@#$%^&" + color_keys="pqwertyu01234567xczv;asdfghj)!@#$%^&" color_list=[K, R, G, Y, B, M, C, W, k, r, g, y, b, m, c, w, S,CLRSCR,Z,U,bk,br,bg,by,bb,bm,bc,bw,nk,nr,ng,ny,nb,nm,nc,nw ] @@ -104,9 +104,19 @@ class bc: def setup_options(): ''' Create command line options ''' usage=''' -Color notation renderer in ANSI codes -Special syntaxes: - * Colors: insert string ${C}, where C is one of KRGBYMCWkrgbymcwSUZ +Color image renderer in ANSI codes. Example file: + first layer of characters +====CHAR + more characters + go here +====COLOR + color codes go here (letters 1-7,0 and keys below like a piano) + zxcv: zero, bold, clearscreen, underline +====EOI +====PAUSE1.5 + another image starts, pause for 1.5 seconds before drawing the next +====EOF + end of image file ''' diff --git a/vim/ansi.vim b/vim/ansi.vim index 6da6090..001bf8c 100644 --- a/vim/ansi.vim +++ b/vim/ansi.vim @@ -30,9 +30,10 @@ function! CharDraw_blocks () map! 7 ▓ map! 8 ▄ map! 9 █ + map! 0   map! - ▞ map! + ▚ - set statusline=%f\ %=\ [░▀▒▐■▌▓▄█▞▚]\(%v,%l)\ HEX:%B + set statusline=%f\ %=\ [░▀▒▐■▌▓▄█ ▞▚]\(%v,%l)\ HEX:%B endfunction function! CharDraw_lines ()