FSU Home  
208 LOV
  transform Documentation


This page explains how to make any webpage look like an official FSU Mathematics department webpage. This conversion is handled by a computer program called "transform".

This page contains the full documentation for the "transform" program.


transform [ <.basis filename> | <filename> | -a | -c | -q ]

You pass the name of an HTML webpage (renamed to end in ".basis") as the first option to transform. The program writes out a webpage, minus the ".basis" extension (and thus using the original filename), that has the look and feel of an official FSU Mathematics webpage.

Alternatively, you can leave out the ".basis" part of the filename and transform will automatically figure it out.

If instead you pass the option "-a", transform will recursively apply the conversion to all ".basis" files in the current directory tree, including subdirectories. The "-q" option makes transform perform quietly, and the "-c" converts a page from standard input to standard output.


Usage Prerequisites

The webpage that you want to convert must conform to a minimal set of rules. Please note that if you are using a webpage editing program such as Netscape Composer then you are probably safe and can skip this list. However, if you are writing your own webpage then please make sure the webpage follows these rules:

  1. There must be exactly one pair of <title></title> tags.
  2. There must be exactly one pair of <body></body> tags.
  3. The webpage must not use frames, i.e. <frameset></frameset>.
  4. Basically everything in the <head></head> section will be removed, so do not place important stuff in that section other than the title.

Although not required, it is worth noting that you should also have exactly one pair each of the <html></html> and <head></head> tags to comply with the HTML standard. To check and see if your HTML is valid, please visit the W3C HTML Validation Service.

Another prerequisite is that you be able to login (ssh) to one of the FSU Mathematics department's UNIX machines. If you are already on a UNIX computer then you are probably fine. If you are on a Macintosh or are using Windows, then you should use SSH. In either case you should open a connection to "hilbert.math.fsu.edu", or any other FSU Math UNIX computer, and login with your FSU Math username and password. For more information please see the "Hitchhiker's Guide" links in the Tech Support section of the FSU Math website, or e-mail someone in Computer Support.

Steps to convert a webpage to FSU Mathematics style:

Extremely simplified instructions:

  1. Log in.
  2. cd public_html
  3. mv webpage.html webpage.html.basis
  4. transform webpage.html
  5. Follow the instructions below to do any updating.

Detailed instructions:

  1. Login to a FSU Mathematics UNIX computer.
  2. Change directories to the location of your webpage. For example:
    hilbert> cd public_html
  3. Rename the file to whatever it was before, but with the addition of ".basis" to the end. Here is a command in UNIX as an example (the first word, "hilbert>", is a typical prompt, not part of the command):
    hilbert> mv index.html index.html.basis
  4. Run the transform command, located in /opt/bin. The program is called like this: "transform <name of .basis file>". If "/opt/bin" is in your path (it probably is, you can check by typing "echo $PATH"), then you can just enter:
    hilbert> transform index.html.basis
    (Incidentally, just "transform index.html" will also work.)

    This step takes the webpage stored in the ".basis" file ("index.html.basis") and writes out a new webpage, storing it in the same filename but without the ".basis" extension ("index.html"). This filename should be the original filename of the webpage.

    Start with:     index.html
    Rename: index.html     to     index.html.basis
    Transform: index.html.basis     to     index.html
    End with:
    index.html.basis       (original webpage)
    index.html (modified webpage)

    First you started with "index.html" and then you renamed it to "index.html.basis". Now this program writes a new file and calls it "index.html" which is the same filename as the webpage you started out with.

    In the end you have two files: one with a ".basis" extension at the end, which contains the original webpage, and a second without the ".basis" extension at the end, which contains the modified page. This second file is the webpage you want people to see.

  5. Check the permissions of the file, making sure it is world-readable. This may or may not be a necessary step. Do "ls -l index.html" and make sure the result looks something like this:
    -rw-rw-r--   1 kbeason      2500 Apr 27 18:41 index.html
           |_ make sure there is an "r" here.
    If there is no "r" on the 8th character, you should run this command:
    hilbert> chmod o+r index.html

To view the converted page in your browser, view it the same way you did the original page (You can do this because it has the same filename as the original page). E.g., with Netscape.

Steps to update a page that you have ALREADY converted (VERY IMPORTANT):

Please note that after you have converted a page, you now must edit the ".basis" file, not the converted file. The reason for this is that the converted file is over-written every time you run transform (and all the changes you made to it are lost).

Remember: Edit the ".basis" file.

The steps are simple:

  1. Edit the ".basis" file and make any changes you want. For example:
    hilbert> pico index.html.basis
  2. Run transform on the webpage.
    hilbert> transform index.html     (OR)
    hilbert> transform index.html.basis     (It doesn't matter which)

That's it! Just in case you forget to edit the ".basis" file and not the converted file, transform stores a backup copy of the converted file (before it is over-written) in the /tmp directory of the computer you are logged into.

o Cut and paste this example into your own index.html.basis file. Note: Microsoft Internet Explorer (MSIE) users will have to select View->Source.
o Type "transform index.html" and press <enter>.
o Now you have this. Again, MSIE users will have to select View->Source.
o Before and After.

Built in instructions

This information is printed out when you run transform by itself, without any filenames or options.

NAME    : transform
AUTHOR  : Kevin Beason
DATE    : 7/18/1998 through 3/11/2002
PURPOSE : Turns simple (no frames) web pages into FSU Math web pages
USAGE   : transform [ <.basis filename> | <filename> | -a | -c | -q ]


    `transform` takes a webpage whose source is stored in a file containing
a ".basis" extension, and creates a new page having the same filename, but
without the ".basis" extension. The new page will look similar to other FSU
Math department web pages.


    To turn an existing webpage into a FSU Math page:

    1) Rename the file to include the extension ".basis" at the end
       EXAMPLE: "mv index.html index.html.basis"
    2) Run `transform` giving it the name without the ".basis" extension
       EXAMPLE: "transform index.html"
       This will create the new index.html from the index.html.basis file.

    After you have renamed the file to include the ".basis" extension, all
future modifications should be done to the file with the ".basis" extension,
and then you should run `transform` on the file to update it. Every time you
run `transform somewebpage.html` somewebpage.html is overwritten by a new
webpage based on the source code in somewebpage.html.basis. 

    If you want to change a webpage that you have already used `transform`
on, first edit the source in the file with the ".basis" extension, and then
run `transform` on the file again. For example:

    1) Edit the file having the ".basis" extension
       EXAMPLE: "pico index.html.basis"
    2) Run `transform` on index.html again
       EXAMPLE: "transform index.html"


    -a   transforms all files (that have a corresponding .basis file) in
         the current directory and sub-directories.

    -c   transform a page given on stdin and output the transformed page
         to stdout.

    -q   suppresses normal messages (quiet mode).


    Please visit http://www.math.fsu.edu/Misc/transform.html for the full

    If you need further help or discover a bug, please e-mail


If you still need help, even after you have read this entire document, please email Webmaster.