4 ms·
That's an interesting thought. Obviously one can present this stuff as just in-line text instead of using images, with appropriate styles for monospacing and c
by JdeBP 3y ago
That's an interesting thought. Obviously one can present this stuff as just in-line text instead of using images, with appropriate styles for monospacing and colours (although that does then highlight that these fancy prompts often make unwarranted assumptions about what's in the Unicode Private Use Area). There are many WWW pages out there doing exactly that. But I for one have not heard of a tool that can screenshot a text terminal emulator's buffer straight into HTML.
- rascul 3y ago'script' to record the session then 'aha' to convert to html.
- JdeBP 3y agoThat's not screenshotting the actual terminal display buffer, and it relies on whatever one uses to do the conversion to process all of the escapes and control sequences in exactly the same way as the terminal emulator did. There are some long standing bugs against the aha tool pointing out that it does not even come close; including not coping with switching to and from the alternate display buffer. No-one seems to have yet noticed that it doesn't recognize ED or EL or any relative cursor motions, so will have serious problems with things like ZLE in the Z shell, or just plain clearing the screen; or that it doesn't handle 24-bit colour in the same ways as some popular terminal emulators do.
- hiccuphippo 3y agoThe closest I've seen is termsvg which records your terminal and saves to an animated svg. https://github.com/mrmarble/termsvg https://github.com/mrmarble/termsvg
- JdeBP 3y agoThat's not recording the terminal. That's recording the characters, escapes, and control sequences sent to your terminal. It isn't actually recording what the terminal does in response to them. It isn't screenshotting, and terminal emulators differ in what they do; the same output potentially appearing very differently. Screenshotting would involve reading a Linux KVT /dev/vcsa file, or a display file with my terminal emulator, or using a Kitty plug-in to get at its display buffer contents, or attaching to a screen/tmux server and reading out its display, or similar (if even possible) for other terminal emulators. Ironically, BRLTTY can do some of the aforementioned. But it most certainly doesn't spit out HTML.