Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mglh opened this issue Mar 4, 2023 · 8 comments
Open

Comments

@mglh
Copy link

mglh commented Mar 4, 2023

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.

@David-Apps
Copy link

David-Apps commented Mar 5, 2023 via email

@CMB
Copy link
Owner

CMB commented May 9, 2023

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?

@eklhad
Copy link
Collaborator

eklhad commented May 9, 2023 via email

@CMB
Copy link
Owner

CMB commented May 10, 2023

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
}

@WeNeedNothingMediaCorp
Copy link

WeNeedNothingMediaCorp commented Jun 27, 2024

To anyone else finding W returns ?, it should actually be lowercase w.

edit: I was incorrectly running this in browse mode. Disregard.

@eklhad
Copy link
Collaborator

eklhad commented Jun 27, 2024 via email

@WeNeedNothingMediaCorp
Copy link

WeNeedNothingMediaCorp commented Jun 27, 2024

Hi Karl. Mentioned in the other issue, (this issue we are talking on now was just an example of where I noted your examples in the wild that seem to be wrong casing). This thread seems to be about using a shell command filter in browse mode which upper case W didn't seem to work for me, but lowercase did.

In the user guide line 660 and 661 has W uppercase, which I believe is incorrect in that context:

'a,'bW !command : run a range of lines through a shell command and replace them
W !sort : sort the lines in the buffer

Great work btw. Excited about some potential contributions I have in mind.

@WeNeedNothingMediaCorp
Copy link

@eklhad apologies. I was wrong on this issue. I see where my mistake was now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants