https://github.com/liske/htmail-view
single web page renderer based on WebKit2
https://github.com/liske/htmail-view
Last synced: about 1 month ago
JSON representation
single web page renderer based on WebKit2
- Host: GitHub
- URL: https://github.com/liske/htmail-view
- Owner: liske
- License: gpl-2.0
- Created: 2015-09-25T20:52:20.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2019-07-20T21:20:11.000Z (almost 6 years ago)
- Last Synced: 2025-03-23T21:35:49.410Z (about 2 months ago)
- Language: Perl
- Homepage:
- Size: 55.7 KB
- Stars: 20
- Watchers: 4
- Forks: 4
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Changelog: ChangeLog
- License: LICENSE
Awesome Lists containing this project
README
htmail-view
===========About
-----Web page renderer based on WebKit2. In contrast to a ordenary WebKit2-based
browser, *htmail-view* will prevent loading remote content while showing
a single web page (i.e. from a local file).It was written to be called from *mutt* to view HTML mails. It tries to
protect the users privacy by not loading remote resources. The default
browser will be used if the user follows a link.Prerequisites
-------------- Gtk3 gir bindings
- WebKit2 gir bindings
- Perl packages
- Browser::Open
- Glib::Object::Introspection
- URI
- wmctrl (optional; used by wmctrl-wrapper)Installation
------------*htmail-view* is a self-contained perl script. On *Debian GNU/Linux* you
could use the prepared **.deb** packages (see github releases).Usage
-----### Mutt
`~/.muttrc`
```ini
# prefer plain text
alternative_order text/plain text/enriched text/html# auto convert text/html MIME type to text/plain
auto_view text/html# run viewer defined in mailcap by in attach view
bind attach view-mailcap# mailcap file to use (optional)
set mailcap_path="~/.mutt/mailcap"# handover mail to htmail-view (works only for multipart mails containing text/html payload)
macro index,pager H "htmail-decode" "render html mail using htmail-view"
```The Debian package will aready add an entry to the global mailcap file.
#### Use htmail-view for text/html parts
`mailcap`
```bash
text/html; htmail-view file://%s; test=test -n "$DISPLAY"; nametemplate=%s.html; needsterminal;
text/html; w3m -I %{charset} -T text/html; copiousoutput;
```#### Use wmctrl wrapper (focus handling)
The wrapper will save the window id of the currently focused window **before**
*htmail-view* is launched. After *htmail-view* has been terminated it will try
to restore the focused window.`mailcap`
```bash
text/html; /usr/lib/htmail-view/wmctrl-wrapper file://%s; test=test -n "$DISPLAY"; nametemplate=%s.html; needsterminal;
text/html; w3m -I %{charset} -T text/html; copiousoutput;
```