Git Product home page Git Product logo

shrface's Introduction

SHRFACE

https://melpa.org/packages/shrface-badge.svg

Table of Contents

Description

This package extends shr / eww with org features and analysis capability. It can be used in dash-docs, eww, nov.el, mu/mu4e, anki.el, etc. It is also able to export HTML buffer to Org buffer/file, or download/archive web pages.

img/eww.png

  • Configurable org-like heading faces, headline bullets, item bullets,paragraph indentation, fill-column, item bullet, versatile hyper links(http/https/file/mailto/etc) face and so on.
  • Browse the internet or local html file with eww just like org mode.
  • Read dash docsets with dash-docs and the beauty of org faces.
  • Read epub files with nov.el , just like org mode.
  • Read html email with mu/mu4e , the same reading experience just like org mode without formatting html to org file.
  • Switch/jump the headlines just like org-mode in eww and nov.el with imenu
  • Toggle/cycle the headlines just like org-mode in eww and nov.el with outline minor mode , org-cycle/org-shifttab, or shrface-outline-cycle / shrface-outline-cycle-buffer.
  • org-indent-mode support
  • Analysis capability:
    • Headline analysis: List all headlines with clickable texts, or jump around with ivy.
    • URL analysis: List all classified URL with clickable texts in a buffer, or jump around with ivy.
  • Export HTML buffer to org buffer/file using shr engine (no Pandoc is needed).

The project target is to apply org features and analysis capability to shr, and all libraries that render HTML with shr (Simple HTML Renderer).

As EmacsWiki says:

shr.el is an HTML renderer in Emacs as of version 24.4 (based on libxml2, it was originally a part of Gnus). It’s the basis of the web browser eww.

Installation

It’s available on Melpa :

M-x package-install shrface

Configuration

My Setup

Check config.el

This file is my personal configuration for shrface configured it along with other packages, and I updates it frequently. It can greatly improve your reading experience while also having great performance when using those packages.

You can use it as a reference to configure your own shrface.

Keybindings Example

(with-eval-after-load 'nov
  (define-key nov-mode-map (kbd "<tab>") 'shrface-outline-cycle)
  (define-key nov-mode-map (kbd "S-<tab>") 'shrface-outline-cycle-buffer)
  (define-key nov-mode-map (kbd "C-t") 'shrface-toggle-bullets)
  (define-key nov-mode-map (kbd "C-j") 'shrface-next-headline)
  (define-key nov-mode-map (kbd "C-k") 'shrface-previous-headline)
  (define-key nov-mode-map (kbd "M-l") 'shrface-links-counsel) ; or 'shrface-links-helm or 'shrface-links-consult
  (define-key nov-mode-map (kbd "M-h") 'shrface-headline-counsel)) ; or 'shrface-headline-helm or 'shrface-headline-consult

(with-eval-after-load 'eww
  (define-key eww-mode-map (kbd "<tab>") 'shrface-outline-cycle)
  (define-key eww-mode-map (kbd "S-<tab>") 'shrface-outline-cycle-buffer)
  (define-key eww-mode-map (kbd "C-t") 'shrface-toggle-bullets)
  (define-key eww-mode-map (kbd "C-j") 'shrface-next-headline)
  (define-key eww-mode-map (kbd "C-k") 'shrface-previous-headline)
  (define-key eww-mode-map (kbd "M-l") 'shrface-links-counsel) ; or 'shrface-links-helm or 'shrface-links-consult
  (define-key eww-mode-map (kbd "M-h") 'shrface-headline-counsel)) ; or 'shrface-headline-helm or 'shrface-headline-consult

(with-eval-after-load 'mu4e
  (define-key mu4e-view-mode-map (kbd "<tab>") 'shrface-outline-cycle)
  (define-key mu4e-view-mode-map (kbd "S-<tab>") 'shrface-outline-cycle-buffer)
  (define-key mu4e-view-mode-map (kbd "C-t") 'shrface-toggle-bullets)
  (define-key mu4e-view-mode-map (kbd "C-j") 'shrface-next-headline)
  (define-key mu4e-view-mode-map (kbd "C-k") 'shrface-previous-headline)
  (define-key mu4e-view-mode-map (kbd "M-l") 'shrface-links-counsel) ; or 'shrface-links-helm or 'shrface-links-consult
  (define-key mu4e-view-mode-map (kbd "M-h") 'shrface-headline-counsel)) ; or 'shrface-headline-helm or 'shrface-headline-consult

;; my personaly keybindings (Doom Eamcs)
(map! :map nov-mode-map
    :after nov
    :g "<tab>" 'shrface-outline-cycle ;; redundant, just make sure it works
    :nie "TAB" 'shrface-outline-cycle ;; redundant, just make sure it works
    :nie "S-<tab>" 'shrface-outline-cycle-buffer ;; redundant, just make sure it works
    :g [backtab] 'shrface-outline-cycle-buffer ;; redundant, just make sure it works
    :nie "<backtab>" 'shrface-outline-cycle-buffer ;; redundant, just make sure it works
    :nie "C-j" 'shrface-next-headline
    :nie "C-k" 'shrface-previous-headline)

Contributors

shrface's People

Contributors

chenyanming avatar jeremyf avatar aloisjanicek avatar gopar avatar syohex avatar xuchunyang avatar hiecaq avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.