i am wanting a command to output one (small) file in a text box, much like those relational db tools often do.
edit 1:
it would be a plus to put the file name somewhere reasonable in the output.
See Linux 'fmt' and 'fold' commands
i mean something like:
Output:
+--------------+
| this is text |
| in a little |
| box |
+--------------+
and i am wanting to do it in python.
this one should be a module function and command in one file.
There is curses for python. It will be in .py file
i went ahead an wrote my own version of it.
it is not thoroughly tested but seems to work ok.
Output:
lt1/forums /home/forums 48> python box.py box.txt wide.txt | python box.py
+---<STDIN>-----------------+
| +--------------+ |
| | this is text | |
| | in a little | |
| | box | |
| +--------------+ |
| +---<wide.txt>----------+ |
| | this is text | |
| | in a definitely wider | |
| | box | |
| +-----------------------+ |
+---------------------------+
lt1/forums /home/forums 49>
the code is over
here.