From Cambridge University Caving Club - CUCC wiki
Revision as of 09:50, 19 January 2008 by Aaron (talk | contribs) (New page: Editing the expo website is an adventure. Until now, there was no guide which explains the whole thing as a functioning system. Learning it by trial and error is non-trivial. The website ...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Editing the expo website is an adventure. Until now, there was no guide which explains the whole thing as a functioning system. Learning it by trial and error is non-trivial.

The website needs improvement, perhaps a complete overhaul. However, it is impossible to go about fixing it properly until we know how the whole thing works.

This manual is organized in a how-to sort of style. The categories, rather than referring to specific elements of the website, refer to processes that a maintainer would want to do.

Updating anything on the expo website

Getting a username and password

Contact Mark Shinwell.

Version control

No changes should be made directly to any files on the server. Instead, we use a version control system to allow collaborative editing and so that any changes can be rolled back if necessary. In the past this was CVS (Concurrent Version System), and there was guide to using that system. Now we use SVN (Subversion).

To edit the website, you need an SVN client. If you are using windows, [1] is highly recommended. Once you've downloaded and installed it, the first step is to create what is called a checkout of the website or section of the website which you want to work on. This creates a copy on your machine which you can edit to your heart's content. The command to check out the entire expo website is

svn co svn+ssh://cucc.survex.com/home/cucc/svn/trunk/expoweb

In TortoiseSVN, merely right-click on a folder you want to check out to, choose "SVN checkout," and enter

svn+ssh://cucc.survex.com/home/cucc/svn/trunk/expoweb

After you've made your changes, check them back in using

svn ci

or right clicking on the folder and going to check in in TortoiseSVN.

None of your changes will take effect, however, until you've run the expoweb-update script.

The expoweb-update script

The script at the heart of the website update mechanism is a shell script at

 /cucc.survex.com/home/cucc/bin/expoweb-update

To run scripts on the server, you need to log in via SSH. The best way to do this in windows is to download [2].

Updating cave pages

Cave description pages are automatically generated from a comma separated values (CSV) table named CAVETAB2.CSV by a perl script called make-indxal4.pl .

The first step is to check out, edit, and check in CAVETAB2.CSV, which is at

/home/cucc/www/expo/noinfo/CAVETAB2.CSV

Next, run

/home/cucc/www/expo/noinfo/make-indxal4.pl CAVETAB2.CSV

Your changes should now be visible on the website.

Updating expo year pages

Each year's expo has a documentation index which is in the folder

/home/cucc/www/expo/years

, so to checkout the 2007 page, for example, you would use

svn co svn+ssh://cucc.survex.com/home/cucc/svn/trunk/expoweb/years/2007