Add capabilities to get and render manpage output in the Web UI#881
Add capabilities to get and render manpage output in the Web UI#881
Conversation
…f hard coded disk image file ending help text.
|
@rdmark A better user experience might be to generate HTML from the raw manpage data. See https://linux.die.net/man/1/man2html. Not sure whether this is better, though. |
|
One thing to consider with this change set is that the standalone web UI install does not install the manpages, so we get an error. These are installed as part of the |
That's a fair point. However, then you install the Web UI stand-alone, wouldn't you already have installed RaSCSI proper earlier? Without the RaSCSI backend running, the Web UI will error out when you try to access it. I'm not opposed to the improvement, but it seems a bit redundant at a glance. :) |
* Capitalization of description paragraph * Flesh out descriptions of disk image types * Remove redundant word
…ooter. Other UI tweaks.
|
As a workaround, could we try an approach like this, where we give the path to the docs instead? |
Good idea! Although I'd say the rendered txt is even better to display. Added some code to do this. |
nucleogenic
left a comment
There was a problem hiding this comment.
Rather than using calls to external programs, I think we should utilise the pre-formatted RaSCSI documentation text files, if we can. I wasn't aware they existed, so using man for the formatting seemed like the best idea when I first commented (sorry!)
I do not think there is much of a use case for a general purpose man wrapper, but I could be wrong on that.
The code example I gave could be enhanced to remove the two warning lines, e.g. by using file.readlines() instead of file.read() and manipulating the list.
I went a slightly different route, keeping the get_filecontents() class method generic, and then stripping out the header lines in the show_manpage() endpoint. It's not the most memory efficient way, but it doesn't really matter for this use case I think. |
|
SonarCloud Quality Gate failed. |









Uh oh!
There was an error while loading. Please reload this page.