CMB / edbrowse

A command-line editor and web browser.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Is it possible to let edbrowse load web pages with an external program?

mglh opened this issue · comments

commented

I would like to use edbrowse in conjunction with rdrview.

Setting edbrowse as browser for rdrview with rdrview -B edbrowse works for the first page loaded, where the page is loaded by rdrview, but not for pages opened from that one in edbrowse, since they are loaded by edbrowse itself, bypassing rdrview.

I made some slight modifications to the rv function proposed by David:

function+rv {
db0
ub
W !rdrview -H -T 'title,body' -u "$EB_BASE"
b
!echo rdrview render done
db1
}

My command will include the title in the output, and I often want that,
especially when I save versions of pages after running them through readability
converters. I also pass along the base URL to rdrview, because if you
don't, relative links are going to be messed up. Finally I temporarily
set debug level to 0 so that you don't see a bunch of number spam
as the buffer is unbrowsed, filtered, and rebrowsed.
I don't know what the old debug level was, so it gets set back to the
default of 1.

Do either of these functions solve your need satisfactorily?

commented

That's nice to know about debug levels and functions.

Another problem with rv is that filtering the buffer will flag the
buffer as changed. So in my latest version, I've used bw to remove that flag.

function+rv {
db0
ub
    W !rdrview -H -T 'title,body' -u "$EB_BASE"
b
!echo rdrview render done
bw
}