Urlview – URL extractor/launcher

March 10, 2010 at 5:16 pm Leave a comment

One day, I was browsing through the conf files in /etc in Fedora. I came across a file “urlview.conf”. On further looking, I came to know there exists a program “urlview” to extract URLs from text files and display a menu from which you may launch a command for a specific URL.

To get started, urlview needs to identify the configuration. For this it looks for ~/.urlview and /etc/urlview.conf in that particular order. If no configuration commands are specified in the two files, it uses the default configuration.
The configuration is as follows :-

REGEXP regexp
COMMAND command

where

regexp : regular expression to be used to extract the URLs from the text files.
command : command to be executed on selecting a URL from the list of the extracted URLs. If the specified command contains a %s, it will be substituted with the URL that was requested, otherwise the URL is appended to the command string.

(The order of the two options doesn’t matter.)

The default configuration is :

REGEXP  (((https?|ftp|gopher)://|(mailto|file|news):)[^' \t<>"]+|(www|web|w3)\.[-a-z0-9.]+)[^' \t.,;<>"\):]
COMMAND url_handler.sh %s

I hope this tiny utility will be fun to use for all of you.

Entry filed under: Tips, Tricks, Urlview. Tags: .

Instant Web Server for sharing Files

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed


 

March 2010
M T W T F S S
« Aug    
1234567
891011121314
15161718192021
22232425262728
293031  

Blog Stats

  • 6,440 hits

Follow

Get every new post delivered to your Inbox.