Skip to content
This repository has been archived by the owner on Feb 2, 2023. It is now read-only.

gportay/webviewer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Qurlew - web browsing from stdin

What is it?

Qurlew is a fullscreen web browser displaying URLs read from its standard input. Think about Qurlew as a minimalist browser whose address bar is deported in stdin. This can be a good candidate to build custom systems such as a smart TV OS.

It is based on QtWebEngine, which is a Qt class wrapping the Chromium web browser.

Note
Qurlew can stand for Qt URL WebEngine, or something like that…​
To be honest, curlew was a word containing URL and a w for web, replacing the c with q for Qt made a neat candidate name for this project!

Getting started

Qurlew depends on qt5-webengine, a package of the same name on most Linux distributions.

You can download and compile the project from source with:

git clone git@github.com:qurlew/qurlew.git
cd qurlew/
qmake
make

Try the browser with:

./src/qurlew -u https://github.com:qurlew/qurlew

Examples

Qurlew picks URLs from its standard input, one URL per line, and so on until stdin closes. There are many use cases for this, below are a few of them.

Interactive Console

./src/qurlew
https://github.com/qurlew/qurlew
^D

Basic while loop scheduling

You can simply loop on a few chosen URLs every two seconds with:

while :
do
  echo https://github.com/qurlew/qrab
  sleep 2
  echo https://github.com/qurlew/buildroot
  sleep 2
done | ./src/qurlew

Basic file based scheduling

Drop a few HTML file in a pages directory and rotate them every five seconds with:

for i in pages/*.html
do
  echo "file://$PWD/$i"
  sleep 5
done | ./src/qurlew

Note that you need to specify a full path URL.

Socket

(openbsd) netcat is a great tool to wire up a socket interface to an application.

INET socket

If you need a network access to the web browser, you can plug a TCP socket with:

nc -kl 1234 | ./src/qurlew

Or use -u for an UDP socket.

Send URLs with echo https://github.com/qurlew | nc localhost 1234.

The -k option will keep the socket listening for new connections.

Unix socket

A Unix domain socket is useful to keep Qurlew running as a local service, without access from the network.

nc -klU /tmp/qurlew.socket | ./src/qurlew

Send URLs with echo https://github.com/qurlew | nc -NU /tmp/qurlew.socket.

License

Qurlew is licensed under the terms of the GPLv3. See the LICENSE file.