Feature description:
- Creates an HTML file in the current working directory, like
echo -e '\e[10i';
- Automatable (does not require a human to click mouse etc), like
echo -e '\e[10i';
- Unlike
echo -e '\e[10i', ignores window height, so the content pushed beyond the top border is also included;
- Unlike
echo -e '\e[10i', ignores window width, so the content that wraps visually doesn't generate <br>.
Use case:
- Create a web page which uses HTML dump to demonstrate some command line tool(s)'s usage;
- There are many, many dumps so this needs to be automatable (operated by script without human intervention);
- Demos may contain a large number of commands, and no matter how tall the screen is, some content will always be pushed beyond the top border;
- Line wrapping (or horizontal scrolling) should be controlled by downstream CSS, not by however the window/screen width is at the time of dump.
Currently 3. and 4. are unavailable. There are workarounds such as ansi2html, which add a nested layer of <span> wherever style changes causing The W3C Markup Validation Service to warn you about DOM tree depth, and do not handle styles such as blinking.
Code and screenshot demonstrating 3. and 4. currently are unavailable:
commands=$(cat <<-'EOF_commands_dump'
"$SHELL" -i 0<<-'EOF_commands'
printf -- '%0.d\n' {1..1000}
printf -- '-%0.s' {1..1000}
EOF_commands
echo -e '\e[10i'
EOF_commands_dump
)
/git-bash.exe -c "$commands"
- Numbers less than 945 are lost (according to the window height at the time of dump).
- The last line has superfluous
<br>s (according to the window width at the time of dump), so even if downstream CSS gives the content more room to fit or allows free horizonal scrolling, the line wrapping still occurs.
Screenshot demonstrating how the result will be used when 3. and 4. are available (https://jhcarl0814.github.io/ClosedAI/git/git.html ):

Feature description:
echo -e '\e[10i';echo -e '\e[10i';echo -e '\e[10i', ignores window height, so the content pushed beyond the top border is also included;echo -e '\e[10i', ignores window width, so the content that wraps visually doesn't generate<br>.Use case:
Currently
3.and4.are unavailable. There are workarounds such asansi2html, which add a nested layer of<span>wherever style changes causing The W3C Markup Validation Service to warn you about DOM tree depth, and do not handle styles such as blinking.Code and screenshot demonstrating
3.and4.currently are unavailable:<br>s (according to the window width at the time of dump), so even if downstream CSS gives the content more room to fit or allows free horizonal scrolling, the line wrapping still occurs.Screenshot demonstrating how the result will be used when
3.and4.are available (https://jhcarl0814.github.io/ClosedAI/git/git.html ):