You are not logged in.

#1 2016-07-31 21:37:46

thebombzen
Member
Registered: 2016-07-14
Posts: 6

HTML Documentation Command Line

So some packages come with HTML documentation, such as openjdk8-doc, or FFmpeg (which I built myself). I'm not sure if there's an easy way to view HTML docs from the command line, though.

Suppose I want to look up BufferedInputStream from Java. According to pacman -Ql, the file I want to view is located at /usr/share/doc/java8-openjdk/api/java/io/BufferedInputStream.html. So in theory, if I want to view it, I could run lynx, and even automate it using some kind of script like this:

lynx "$(pacman -Qlq | grep java/io/BufferedInputStream.html)"

but this feels like a kludge. I feel that there's gotta be a better way to do this.

TL;DR: Is there a simple command to view a particular HTML Documentation, possibly with a config/environment to give it your favorite HTML viewer? Thanks.

EDIT: I'm looking for an equivalent of "man" but for HTML documentation. Like, "man java/io/BufferedInputStream" or "man ffmpeg-filters" or something of that form.

Last edited by thebombzen (2016-07-31 21:39:57)

Offline

#2 2016-07-31 22:24:09

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,442
Website

Re: HTML Documentation Command Line

Just make a alias/function and use lynx, or w3m, perhaps with the --dump parameter, or use pandoc, or ...


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

Board footer

Powered by FluxBB