[Tipz] Nautilus and POD documents

Ian Langworth bass at ccs.neu.edu
Tue Feb 1 01:21:52 EST 2005


I wanted a one click solution to viewing the POD of perl scripts or
modules with Nautilus The solution: make sure Pod::Html is installed,
and copy the following script to ~/.gnome2/nautilus-scripts/podview:

     #!/bin/sh
     for i in $@; do
         t=`tempfile`
         pod2html --infile=$i --outfile=$t \
             --css='http://www.ccs.neu.edu/home/bass/bass.css'
         mozilla-firefox -remote "openURL(file://$t,new-window)"
         ( sleep 2 && rm $t ) &
     done

You may have to open up the nautilus-scripts directory and refresh.
Afterward, right-clicking on a document shows a "Scripts" submenu, which
contains a "podview" item. And, my stylesheet is pretty.

-- 
Ian Langworth
Project Guerrilla
Northeastern University
College of Computer and Information Science




More information about the Tipz mailing list