The Green Bank Telescope

WebConv

WebConv is a utility which converts web pages to the new NRAO Green Bank style

The WebConv utility is a bash shell script that runs under Linux or Mac OS X. There are four versions of the utility which extract the content of various types of web page and then recreate the page using the Green Bank web page master template (see www.gb.nrao.edu/gbtemplates for template details).

The four types of conversion are as follows:

html2gbweb - converts regular HTML files on the local file system.
web2gbweb - converts regular HTML pages on any remote web server.
twiki2gbweb - converts NRAO twiki pages at wiki.nrao.edu or wikio.nrao.edu.
gbwiki2gbweb - converts Green Bank wiki pages at wiki.gb.nrao.edu.

Superfluous HTML tags are removed prior to rebuilding the page. Please note that the conversion process can not correct bad HTML syntax. Relative links will need editing if your new page is being hosted in a different location from that of the original page. The desirability or otherwise of the results of using WebConv will depend on how well original pages have been crafted. In many cases a few simple edits will be all that is required to complete the migration of an old page to the new NRAO style.

Useage

The utility is run from the command line as follows:

     html2gbweb   filename [username] [forename] [surname] ["New Page Title"]
     web2gbweb    URL [username] [forename] [surname] ["New Page Title"]
     twiki2gbweb  URL [username] [forename] [surname] ["New Page Title"]
     gbwiki2gbweb URL [username] [forename] [surname] ["New Page Title"]

e.g. twiki2gbweb https://wikio.nrao.edu/bin/view/GBT/WebHome tgreen Teresa Green
New files are named "new_filestub.shtml" and placed in the current working directory. If a URL points at a directory the new filename will be "dirname_index.shtml".

It is also possible to specify a username, forename and surname for the update link at the bottom of the new page. The default is the current user's login name. A new page title can also be specified (which must be quoted).

Installation Instructions

Download webconv.tgz to your desktop.

Then open a terminal window and type these commands:

     cd Desktop
     gunzip webconv.tgz
     tar -xvf webconv.tar
     cd webconvsrc
For Linux systems type:
     ./installwebconv linux
For Mac OS X systems type:
     ./installwebconv osx
Then follow the prompts.

If you do not already have ~/bin in your path, you will be asked if you want your .bashrc modified so that ~/bin is added to your path. If you say no to this, you will have to add ~/bin to your path yourself.

That's it, you are done!

(You can now delete webconv.tar and the directory webconvsrc.)

Please note that WebConv installs all its files in ~/webconv and makes four symbolic links in your ~/bin directory (which is why ~/bin needs to be in your path).

Bugs and comments to Paul Ruffle.

NRAONSFAUI

The National Radio Astronomy Observatory is a facility of the National Science Foundation operated under cooperative agreement by Associated Universities, Inc.

Last updated 16 April 2008 by Paul Ruffle