Closed phyver closed 3 years ago
Maybe we should just write a tool to fully parse these files, and there write a printing function that takes a maximum width as argument. We could then use ANSI escape codes to do a bit of formatting.
Personally, I think we should avoid the troff syntax: it is quite horrible. We could probably just parse the files as they are now, possibly some marker characters when we want to align stuff.
Yep, I agree. see #43
closed, see cfc9192fe2cd8b8e8c6f2f50f8c90ab5fe0ea071
Currently, goal files have a with of 69 characters. On wide terminals, this might be too narrow.
We could try having the width adapt to the terminal size.
One way to do it would be to reflow the text. That should be quite easy since I insist on having a trailing space inside paragraphs. The only problem I see is for "indented paragraphs", like in
If we keep the indentation, the only problem would be reflowing
find the next occurence ...
. We could even minimize raggedeness using dynamic programming, like in par. I implemented it in Python some time ago, but since we don't need most ofpar
's option, that should be easy to do inawk
.man
to display goal files, but that would require converting goal files to troff, and juggle with theCOLUMNS
variables to have enough room to add the box. On the positive side, it would open the door to have some formatting for goal files, if we find a way forawk
'slength
function to ignore with escape characters.