starius0
u/starius0
I'd like to introduce , Lua binding to ROTE.
is a simple C library for VT102 terminal emulation. It is extremely useful to programmatically interact with curses applications (e.g., for unit testing).
Website:
Version: 1.0.1
License: Lesser GPL 2.1
Installation:
-
install curses, luaposix and ROTE
-
luarocks install lua-rote
lua-rote has almost all functions of ROTE, namely:
-
create a virtual terminal
-
read contents of the virtual terminal
-
fork a child process
-
feed data to the child process
-
draw contents of the virtual terminal on curses window
Most of ROTE functions are represented as class RoteTerm on Lua side.
All functions are covered with unit tests.
Example demo/boxshell.c from ROTE was in pure Lua using luaposix and lua-rote. Both programs include the following steps:
-
start curses,
-
fill the screen with blue,
-
create curses window in the middle of the screen,
-
start ROTE terminal, fork bash inside,
-
do in a loop until child process dies:
-
redraw curses window accorsing to ROTE terminal,
-
getch(), results of which are passed to ROTE terminal.
-
I use lua-rote for unit tests of my other project, . Alnbox is alignment viewer based on the curses library. It is used to view an alignment of biological sequences from FASTA file in terminal. Scrolling through alignment is provided by arrow buttons, quit with button 'q'. include the following steps: starting alnbox under lua-rote, "pressing" arrow keys, validating contents of the terminal. Unit testing framework is used. Test coverage of both lua-rote and alnbox is 100%.
Keybase proof
I hereby claim:
-
I am on reddit.
-
I am on keybase.
-
I have a public key whose fingerprint is 3379 E9BB 0F1C D321 F307 804C F01C DC55 A6C2 B6CE
To claim this, I am signing this object:
{
"body": {
"key": {
"fingerprint": "3379e9bb0f1cd321f307804cf01cdc55a6c2b6ce",
"host": "keybase.io",
"key_id": "f01cdc55a6c2b6ce",
"kid": "0101e64ac266973435f9e01b2ea9651b31c912bc50deefa5c439e57a4ee4c10f1f530a",
"uid": "f6a1c4b9e45095b54ce726cceb919b19",
"username": "starius"
},
"service": {
"name": "reddit",
"username": "starius0"
},
"type": "web_service_binding",
"version": 1
},
"ctime": 1425486105,
"expire_in": 157680000,
"prev": "65b0129bba54c6732a0f6963dbb134337d8a24848123a45eaf93f0b6bbbca978",
"seqno": 7,
"tag": "signature"
}with the key from above, yielding:
-----BEGIN PGP MESSAGE----- Version: GnuPG v1.4.12 (GNU/Linux) owFtUltIVEEY3tXKdsEIutBlCzoWQZjOnHPmnJ01goIoC0Klgm5sM3PmrCdzdz27 bl6wqIiIMuwh7UHtIagoIorMl63IspZ2LbpAUHZDiCBkk6SE1Jpj9ua8DP/3f98/ 33z8Lfm5rhz3d1//9ks9d5650w8wdW37BZc3SjRi1EuBRqmKT1ymFQ5xO2pb4bgU kBRFxxxTCkzIDEWGpgJ0P1CZCUTNECIak6nGuFQoVUZijkKMoSTGi6yIwEQRtAyB TsGvmmgACCDXVMJkTcO6oirIxBxAKnOCNQSpAhmGMmUIGJybBDFVwRzpROVcZVDY MpECiBhX++8djUCmUsxVBDCiSGVclzXGOMUQU4gdYozbYVLNBTsWJ7ZVG5OaCiUB JizhSyQw2bS5YVjxKQXAUcTrow50kNPgpDhIrbAh4hOaBLdjViQsBaBgsrjlqKEq I9WvQYAKJV4XtWwetBwG0jU/EKdQito8IUZqiAIoi9SJ8K/pikyAqWFNMSiFIiFF N/xEVv2qH8oKUREnJlZMQDVKKSNY90vOd2rCESmgC5sk5Bi3QmESr7W51OQ96fZN c7lzXDOm5zgb4PJ6Zv/fi9SnvHEZmKPLqtbeDm/atLNuXWdBR83vdZkzNz5kxxZ3 59/M1+2GB95d2y7fTc953pq8H1qaclUv/Hos91tN9+7eTG4LGk1f/3y068eCeZ6F fdeaBwJP3jze/GLOnzbP1uSde7fKytcvynq37InXvvS3XTyw0pP01ZyXZnawJXml fd73KbuiYG9D2VyP0pKITm9/25U+fTiZWHNhJFj8ZuP8kDm2vyV7ddWX4Zc9lbPO jp8bKx9s7n/affnQo1MPPb1VqdKh7JF9qaHVV+6++1ixoSzbunKk2DuIj99vL7re tSEzMlpyZEc0mKkeqCeHhxIj7MS71z9L5P5I+lTnq6EVw5W+pNv3Fw== =zTBu -----END PGP MESSAGE-----
Finally, I am proving my reddit account by posting it in