Browse guide

Browse guide#

Overview#

The --browse | -b flag can be passed with the Open command and Send command command to turn your terminal into a full fledged web browser

Guide#

Note

This guide will be done with the -nd (no driver) flag passed. While some features (such as tabs) have not been added to driver mode they will eventually be implemented. (i think). However it is recommended that any browsing is done in --no-driver mode as driver mode is significantly slower and isnt a great experience.

This is a basic example of the command asrch open text https://python.org -nd -b

Example of browsing

Fig. 1 Example of browsing to python.org.#

Example of browsing

Fig. 2 Figure of index table#

as you can see after entering the page number a few things will show up. First the URL being navigated to, the current tabs and the sessions browsing history and the next / previous page.

Note

the extra history (below) will be removed at some point

_images/browse-ex3.png

Fig. 3 Figure showing example of history / tab bar#

As shown in Fig. 2, there are a few options. They are straightforward and shouldn’t be too hard to understand.

q quits the session and deletes any history or tabs

< navigates to last page in history (if it exists)

h{n} navigates to nth element in history. Ex: h2 nagivates to second element in history (history elements are numbered so this value should correspond to the element number in Fig. 3) for example in this image h1 would send me to https://python.org/psf-landing/

Note

the following have not been pushed however are being implemented in the new release

nt | new_tab creates new “tab”

If a user chooses this option they will be prompted for another URL. This URL will be opened in a “new tab”, for example: >> url: https://github.com opens a new tab to https://github.com.

Tabs#

Tabs are confusing as hell so heres a little overview and guide on them

When a user passes the nt option they will be prompted for a URL. This URL will be opened in a new tab. Tabs are a way the user can have mutiple pages “open” (cached) so the user could have https://python.org open at the same time as https://github.com. Caching happens when a new tab is created, the pages contents is written to a temporary dotfile which will be referenced each time the page needs to be displayed, this allows a user to revisit a page without making an extra request.

Session history is global and independent of the tabs history.

Other info#

Caching#

Note

Caching has been pushed in the most recent update however cant confirm its stability. Some issues still occur such as no boxes.

Caching (webpage caching) is just a simple way to store the highlight_element() return value in a text file, for near instant response.

the ccache :doc:command<main.rst> can be used to clear cache if a web page has updated. By default cache does not clear so keep this in mind

Note

this command will soon have more options ccache print, ccache clear ect… however it is still in early beta.

in later updates images might be supported, in this case images would also be cached.