Giter Site home page Giter Site logo

dnalor / reader Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mrusme/reader

0.0 0.0 0.0 21.82 MB

reader is for your command line what the “readability” view is for modern browsers: A lightweight tool offering better readability of web pages on the CLI.

Home Page: https://xn--gckvb8fzb.com/reader-web-page-readability-on-the-cli/

License: GNU General Public License v3.0

Go 100.00%

reader's Introduction

reader

reader is for your command line what the “readability” view is for modern browsers: A lightweight tool offering better readability of web pages on the CLI.

reader

reader parses a web page for its actual content and displays it in nicely highlighted text on the command line. In addition, reader renders embedded images from that page as colored block-renders on the terminal as well.

Usage

reader https://xn--gckvb8fzb.com/superhighway84/

Don't render images:

reader --image-mode none https://xn--gckvb8fzb.com/superhighway84/

Output raw markdown, don't pretty print:

reader -o https://xn--gckvb8fzb.com/superhighway84/

Read from file:

reader ${HOME}/downloads/example.com.html

Read from stdin:

curl -o - https://superhighway84.com | reader -

Render images using the SIXEL graphics encoder:

reader --image-mode sixel https://xn--gckvb8fzb.com/travel-aruba/

sixel

More options:

reader -h

Examples

Using reader from within w3m

While on a web page in w3m, press ! and enter the following:

reader $W3M_URL

This will open the current url with reader. w3m will wait for you to press any key in order to resume browsing.

If you want to navigate through the page:

reader $W3M_URL | less -R

Using reader from within vim/neovim

Add the following function/mapping to your init.vim:

function s:vertopen_url()
  normal! "uyiW
  let mycommand = "reader " . @u
  execute "vertical terminal " . mycommand
endfunction
noremap <Plug>vertopen_url : call <SID>vertopen_url()<CR>
nmap gx <Plug>vertopen_url

Open a document and place the cursor on a link, then press g followed by x. Vim will open a new terminal and show you the output of reader.

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.