Skip to content

Launch bookmarked URLs from CLI

Ravi J edited this page Jan 3, 2021 · 6 revisions

Store bookmarks which could be passed to a macro to launch from the user's browser of choice. Follow the steps below for google chrome:

Create a table named myurls

qkw -C -cT myurls

Store the URLs in the table myurls. Note that, this table is not added to configuration file

qkw -tbl myurls -iC gg:"www.google.com"
qkw -tbl myurls -iC ys1:"https://youtu.be/q0hyYWKXF0Q"
qkw -tbl myurls -iC gi:"images.google.com"
qkw -tbl myurls -iC gn:"news.google.com"

Add a shell macro to ~/.bashrc for launching

cf(){
  google-chrome  `qkw -tbl myurls -gC $1` &
}

source ~/.bashrc

Launch some url from CLI

cf ys1
cf gn
cf gi

In case a user has custom server sessions with environment specific URLs, this approach helps store your tags in the appropriate tables without having to bind them to the operating system specific browser while simultaneously offering the ability to search.

This approach helps with launching bookmarks from CLI

  • Regular URLs
  • REST API endpoints
  • launching environment specific URLS:port, say jupyter notebooks
  • etc

Eg:

localhost:2021/x/y/z

While most browsers have the in-built bookmark feature, this method is yet another way to launch from CLI. For other browsers like firefox, mozilla, etc please look into the appropriate docs to bind the browser binary with qkw data.

Clone this wiki locally