Archive for March, 2010

Urlview – URL extractor/launcher

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.

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

Instant Web Server for sharing Files

To set up a web server for sharing some files with your friends, go to the directory containing the files to be shared, and use the following command

python -c "import SimpleHTTPServer; SimpleHTTPServer.test();"

Your web server is ready to be used and can be accessed at

http://<Your-IP-Address>:8000

After the sharing is done, press Ctrl+C to exit and turn the server off. Simple and Easy, isn’t it ?

Source : LinuxForYou

March 6, 2010 at 10:38 pm Leave a comment


 

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.