WWP Encoding Howtos

From Digital Scholarship Group
Jump to navigation Jump to search

This is a potpourri of information which may be useful to encoders and staff. Generally it has instructions on how to do specific tasks in a particular environment (e.g., how to count the number of <lb> elements in a textbase file from the shell). No claim is made that the instructions herein are the best way to do something, only that they work, or at least did at the time of writing.:-) Someday this may be organized and fleshed out into useful documentation.

How to edit a textbase file in oXygen instead of Emacs

First, plan on going to confession --- this is considered a sin by the more fundamental adherents to the religion of Emacs. Furthermore, you need to have a valid oXygen license installed on our account on golf to do this.

So, log into golf using a windowing system (e.g. from a Macintosh use X11, not Template:Terminal). For the instructions below, we're assuming that the document you want to work on is All Men Are Scum written by "A. Lady", and is currently under construction.

1. Change to the directory where the file lives: cd ~/tb/under_construction/

2. If it is not already checked out to you, check the file out from RCS: co -l -zLT alady.menRscum.xml. You should get a message like

RCS/alady.menRscum.xml,v --> alady.menRscum.xml
revision 1.17 (locked)
done

The -l switch tells RCS to lock the checked-out file; the -zLT tells RCS to use the local time zone when updating the $Header:$field in the file.

3. Issue oxygen alady.menRscum.xml &. Note that this is exactly analogous to issuing emacs alady.menRscum.xml & the way you usually do. The ampersand is not required; it is what allows you to continue to use the shell window, rather than having that window frozen until you quit oXygen.

4. Edit the file.

    • Make no errors.
    • Don't rely solely on continuous validation; validate "for real" occasionally by clicking on icon w/ red check mark.
    • Save early and often.

5. When you're done editing the file either close its window (if you have more work in oXygen to do) or quit oXygen.

6. Either way, go back to the shell (which should still be available to you because of the "&" you typed at the end of the editor command) and check the file back in:ci \-zLT alady.menRscum.xml. You will be prompted to enter an RCS log message, e.g.:

RCS/alady.menRscum.xml,v  <--  alady.menRscum.xml
new revision: 1.18; previous revision: 1.17
enter log message, terminated with single '.' or end of file:
>> Changed all occurences of the letter 'x' to "[censored]"
>> .
done

Instead of a dot, you could enter a ^D character, which is entered by holding down the CTL key and typing the d key.

7. Rejoice.

How to use your own GNU/Linux laptop to edit textbase files

  1. Make sure you are behind the Brown firewall (i.e., either on campus or using VPN --- regular wireless works, you don't need Brown Secure)
  2. from an XTerm issue ssh shortid@golf.services.brown.edu &
  3. from the new XTerm window (at which you are logged into golf) issue emacs &

How to use your own Mac OS X laptop to edit textbase files

  1. Ensure that X11 is installed. (!) If using 10.5.3 see https://wiki.brown.edu/confluence/x/oAETAQ, first list, #26
  2. Using your favorite text editor (Emacs), create or edit the file ~/.bashrc (!) It is often hard to open files that start with a dot in "normal" Mac editors
  3. If creating a new file, start with the line "#! /bin/bash"
  4. Add the line "alias dev='ssh -Yf -l shortid -c 3des -2 golf.services.brown.edu -p 22'
  5. Add the line "alias edev='ssh -Yf -l shortid -c 3des -2 golf.services.brown.edu -p 22 /usr/bin/emacs'
  6. Save the file, which should look as follows
#! /bin/bash

alias dev='ssh -Yf -l shortid -c 3des -2 golf.services.brown.edu -p 22
alias edev='ssh -Yf -l shortid -c 3des -2 golf.services.brown.edu -p 22 /usr/bin/emacs

where "shortid" is your Brown shortid, of course.

7. Run X11, create a new XTerm window

8. From behind the Brown firewall (i.e., either on campus or using VPN --- regular wireless works, you don't need Brown Secure) issue edevin that new XTerm window.

How to use your own MS Windows laptop to edit textbase files

The free Xming client for Windows XP/Vista seems to work well (and it's highly configurable if you're the power user type). It comes with PuTTY/SSH built in.

  1. Download the Xming-portable-PuTTY installer package from here. Run the installer.
  2. Download the Xming-fonts installer package here. (You'll need this since emacs doesn't support client-side fonts.) Run the installer. When asked where you want to install the fonts, be sure to select the same folder where Xming is installed (probably called "Xming"). If you don't install the fonts in the same folder, you won't be able to view text in emacs properly.
  3. Once Xming and its fonts have been installed, go to Start Menu > All Application > Xming and select XLaunch . This is a wizard that allows you to save a configuration file that will launch your X windows session with the right WWP settings.
    • On the first configuration screen, select the "Multiple Windows" option. Then click "Next".
    • On the next screen, select "Start a program". Then click "Next".
    • At the next screen, select "Using PuTTY (Plink.exe)". In the "Connect to computer" field, enter "golf.services.brown.edu". In the "Login as user" field, type your WWP user name. Leave the password field blank. Then click "Next".
    • Don't enter anything in the next configuration screen. Click "Next".
    • On the final configuration screen, click the button that says "Save configuration." When prompted, save the configuration with whatever name you choose (something like "wwp.xlaunch"). Be sure to add the ".xlaunch" file extension, as Windows seems to have difficulty recognizing the file without it. Click "Finish" at the bottom of the window. That's it\!
  4. Once you've installed Xming and created a configuration file, you can launch a session on the WWP server simply by double-clicking the wwp.xlaunch file (or whatever you named it in the final configuration step). When you launch Xming in this way, you'll find yourself presented a standard terminal window. At the command prompt, simply type emacs & to run emacs in a separate window. Note: you'll need to be behind the Brown firewall to connect to WWP resources. This means that if you're off campus you'll need to connect via the Brown VPN.