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

Use with qutebrowser and pipes #44

Open
danlkv opened this issue Feb 24, 2020 · 3 comments
Open

Use with qutebrowser and pipes #44

danlkv opened this issue Feb 24, 2020 · 3 comments

Comments

@danlkv
Copy link

danlkv commented Feb 24, 2020

Hello

How can I use uniread to read webpages from qutebrowser? Maybe it would be possible if I extract text from qutebrowser webpage, then pipe it into stdin of uniread?

@nemanjan00
Copy link
Owner

As an qutebrowser user, I have to say this sounds interesting.

If you are ok with some dependencies,maybe you could do something like saving html, converting it to pdf and opening pdf.

Honestly I am not sure how handoff from piped file to real stdin works, so, I am not sure how I would make file pipe and controlls work at the same time. Will have to look into this

@nemanjan00
Copy link
Owner

Or we could do something like this in JS:

document.body.innerText

from qutebrowser userscript, write optput to the file, and open file with uniread

@danlkv
Copy link
Author

danlkv commented Mar 21, 2020

It would be better to use readabilty instead of just innerText , like in this script: https://github.com/qutebrowser/qutebrowser/blob/master/misc/userscripts/readability
I think the usage can be following:
$ get_current_text.py | uniread
where get_current_text.py

  1. gets last active qutebrowser page
  2. extracts text using readability
  3. prints it

Reading input till EOF should work, is it easy to implement in uniread? Having ability to read streams without end would also be nice, but I can't think of any usecases for this.
I don't like saving a temporary file and than reading it, because of need to create some temp dirs, and dealing with permissions...

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

2 participants