-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhanced RichDecorator/--colour features: References and Border Colors #131
Comments
For the moment I've been able to get the equivalent result by concatenating outputs of both "Rich" and "Plain" with It's a bit sloppy, but it's the best result my neomutt has ever seen. If html2text could do it directly that would be great. Neomutt's
#!/usr/bin/env bash
shopt -s extglob
export LC_ALL="C.UTF-8"
export TZ=:/etc/localtime
[[ $3 -lt 80 ]] && _columns=$3 || _columns=80
html2text --width $_columns --wrap-width $_columns --colour "$1"
echo
html2text "$1" | sed -E '/^\[1\]: /,$!d' | tr -d '\n' | sed -E 's/(.)(\[[0-9]*\]: )/\1\n\2/g' |
That seems like a reasonable think to want!
I think it should be at the
There is #119 , opened recently. It seems reasonable as an option to the
That sounds like the hardest thing! In case it helps, there was a change just merged (#129 ) which adds an option to not draw the borders, in case that solves your problem in the short term. |
Thank you, I will try to write something for About the references width, the issue is that some pagers (like the internal one in neomutt) do not support osc 8, and they wrap urls making it impossible for most terminals to parse them (urxvt has a marker extension to select urls but parse per line). I will go write a comment about osc 8 in #119. About the new options in #129, thanks, it works. I put |
Intro
I tried many solutions to display html emails in mutt/neomutt's internal pager (elinks, readability tools, pandoc, html2text tools), but there was always some issues with the encoding, colors, references or parsing.
After a few tests today, rust-html2text seems to be the way to go, it's fast and the parsing, format, and encoding are spot on.
Request
I changed colors and styles options in the
html2text
example to fit my tastes, but I would like to add 3 features to theRichDecorator
, used by --colour in the example:PlainDecorator
.--wrap-width
, to help with long links osc 8.Would you have time to implement those or give me some leads? (I'm just starting rust)
Extra
My changes to the example (only
Reset
for colors and style was not working correctly for me):The text was updated successfully, but these errors were encountered: