Skip to content

sanel/declutter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

declutter - Read html content without clutter from your Emacs

declutter is a small Emacs addon that will help you with reading online content. It will remove all distractions and present you with readable html, straight inside your Emacs.

declutter can render content using:

Installation

declutter depends on json.el and shr.el. shr.el is part of Emacs since 24.4 version.

To install declutter, just copy declutter.el to $HOME/.emacs.d folder or any other location listed in Emacs load-path variable.

In your Emacs init file, put:

(require 'declutter)

Then, in Emacs:

M-x declutter [RET]

and enter url you'd like to visit.

Usage

By default, declutter will open *declutter* buffer and render cleaned content in it. Actually, this is done by shr.el so all default shortcuts for it works here as well.

declutter adds another useful function - declutter-under-point. When you read through the article and you'd like to open url, you place cursor over link and you have two options:

  • You can use shr-browse-url (v key) which will open article as is
  • Or you can use declutter-under-point to load that url and render cleaned content in *declutter* buffer.

To change rendering engine (default is outline.com API), use this:

(setq declutter-engine 'lynx)     ; lynx will get and render html
; or
(setq declutter-engine 'rdrview)  ; rdrview will get and render html
; or
(setq declutter-engine 'eww)      ; eww will get and render html
; or
(setq declutter-engine 'txtify)   ; txtify.it will get and render html

For lynx and rdrview engines, you can set a custom path to the program binary, with declutter-engine-path. For example, if you have rdrview installed in /opt/rdrview/bin/rdrview, set it with:

(setq declutter-engine-path "/opt/rdrview/bin/rdrview")

Configuration

declutter doesn't have many configuration options, except of declutter-engine, declutter-engine-path and declutter-user-agent (where you can override default user-agent string), but if you want to set default font of rendered content or indentation, check shr.el options.

For example, to use default Emacs fonts and add margins, set this:

(setq
 shr-use-fonts nil
 shr-indentation 2)

Note

When declutter is using txtify.it backend to render the content, be aware that txtify.it can see what you browse. I'm not affiliated with txtify.it in any way.

Bug reports & patches

Feel free to report any issues you find or you have suggestions for improvements.

About

Read html content without clutter from Emacs

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published