Re:Upterm – A terminal emulator and interactive shell based ...
by hnlmorg on Thursday September 21, 2017 @10:14AM
(#15303606)
I do man parsing for one of my projects and it is as painful as HTML parsing. OK the syntax is less complex but you still end up with the problem that the body of text is designed for human consumption so the formatting doesn't always follow the same rules from one man page to the next (tokens aside).
This means that while it is easy enough to pull flags from the man pages, offering usage suggestions is something too tricky to handle in an automated on-demand fashion.
I did toy with the idea of starting a new project porting man pages to a new document format designed specifically for utilities parsing (eg a JSON format with standardised fields). However even that would be a massive job to maintain without the support from other developers upstream.
But I'm open to other suggestions if anyone has any?
This means that while it is easy enough to pull flags from the man pages, offering usage suggestions is something too tricky to handle in an automated on-demand fashion.
I did toy with the idea of starting a new project porting man pages to a new document format designed specifically for utilities parsing (eg a JSON format with standardised fields). However even that would be a massive job to maintain without the support from other developers upstream.
But I'm open to other suggestions if anyone has any?