libcucul-ruby-api3caca
Libcucul ruby api the classes available for libcucul are : the character set conversion functions are not available yet in the binding.
Samples
$ ruby -rcucul -e 'c=Cucul::Canvas.new(6, 3).fill_box(0,0,2,2,'#'[0]);
c2=Cucul::Canvas.new(1, 1).put_str(0,0,'x'); c.blit(1,1,c2); puts
c.export_memory('irc')'
###
#x#
###
$ ruby -e 'puts Cucul::Canvas.new(6,3).draw_thin_polyline([[0,0], [0,2],
[5,2],[0,0]]).export_memory('irc')'
-.
| `.
----`-
$ ruby -rcucul -e 'p Cucul::Canvas.export_list' [['caca', 'native libcaca format'], ['ansi', 'ANSI'], ['utf8', 'UTF-8 with ANSI escape codes'], ['utf8cr', 'UTF-8 with ANSI escape codes and MS-DOS \r'], ['html', 'HTML'], ['html3', 'backwards-compatible HTML'], ['irc', 'IRC with mIRC colours'], ['ps', 'PostScript document'], ['svg',
$ ruby -rcucul -e 'p Cucul::Font.list' ['Monospace 9', 'Monospace Bold 12']