$Id: README.txt 187 2010-03-22 19:32:07Z pwilkins $

sm-transcript reads results of SLS processing and produces transcripts for
the SpokenMedia browser. For each file in the source folder whose extension
matches the source type, a file of destination type is created in the
destination folder. All of these parameters have default values.

Requirements:
sm-transcript is written in Ruby and packaged as a RubyGem. Since Ruby is
not a compiled language, you will need to have Ruby installed on your
machine to run sm-transcript. You can determine if Ruby is installed by
typing "ruby -v" at a terminal prompt. It should return the version of
Ruby that is installed. If Ruby is not installed on your machine, contact
me (or your local Ruby wizard) for assistance.

Installation:
You can get sm-transcript as either a RubyGem or as source from svn.

The preferred way to install this package is as a Rubygem. You can
download the gem from this page:

http://TBD

and install it with this command:

sudo gem install [--verbose] <path to gem file>sm-transcript-n.n.n.gem

You must use "sudo" to properly install the gem. If you execute "gem
install" (omitting the "sudo") the gem is installed in your home gem
repository and it isn't in your path without additional configuration.

Note: You need sudo privileges to run the command as written. If you
can't sudo, then you can install it locally and will need some additional
configuration. Contact me (or your local Ruby wizard) for assistance.

The executable is now in your path.

You can cleanly uninstall the gem with this command:

sudo gem uninstall sm-transcript

If you have access to our svn repository, you are welcome to check out the
code. Be warned that the trunk tip is not necessarily stable. It changes
frequently as enhancements (and bug fixes) are added. (note that the
'smb_transcript' in the command line below is not a typo. )

svn co svn+ssh://svn.mit.edu/oeit-tsa/SMB/smb_transcript/trunk sm_transcript

build the gem by running this command from the directory you installed the
source.

rake gem

The gem will be built and put in ./pkg You can now use the gem
installation instructions above.


Using the App:
Run with no command line parameters, the app reads *.wrd files out of
./results and writes *t1.html files to ./transcripts. These directories
are relative to where sm_transcript is called.

Note: destination files are overwritten without a warning prompt. If you
want to preserve an existing output file, rename it before running the app
again.

For example, run the app by navigating to the bin folder and running

projects/sm_transcript/bin felix$ sm_transcript

This command run from this folder will read *.wrd files from bin/results
and write *-t1.html to bin/transcripts.

Usage: sm_transcript [options]
--srcdir PATH Read files from this folder (Default: ./results)
--destdir PATH Write files to this folder (Default: ./transcripts)
--srctype wrd | seg Kind of file to process (Default: wrd)
--desttype html | ttml Kind of file to output (Default: html)
-h, --help Show this message


Troubleshooting:
sm-transcript requires additional gems to operate. The RubyGem
installation instructions should install dependencies automatically, but
they may not. If you get an error that includes

... no such file to load -- builder (LoadError)

in the first few lines when you run sm-transcript, the problem is a
missing dependent gem. (the error above indicates that the Builder
gem is missing.) Try installing the missing gem. For the error above,
command looks like this:

sudo gem install builder

See "Required Gems" below for more information.


Upgrading:
You can easily upgrade by simply executing the same command you used to
install the gem. Running install again will add the newer version and make
it active. By default the most recent version is used, but older versions
are still available, simply inactive.

If are using svn, you should already know what to do.


Required Gems:
builder - create structured data, such as XML
extensions - added for the 'require_relative' command. (To get this
command in Ruby 1.8 you need to install this gem, for Ruby 1.9
the command is already part of the core.)
htmlentities - html parsing
json - create JSON structured data
optparse - option parsing
ostruct - open data structures
ppcommand - pp is a pretty printer. It is used only for debugging
rake - make for Ruby
rubygems - support for gems
shoulda - enhancement for Test::Unit

This command installs gems on OSX and Linux:
felix$ sudo gem install <gem name>

Unit Tests:
You may run all unit tests by navigating to the test folder and running
rake with no parameters (the default rake task runs all tests):

projects/sm_transcript/test felix$ rake


Release Notes:
Initial Version - runs under Ruby 1.8.

To Do:
update code to run under Ruby 1.9

Make this a rubygem, making it available from an OEIT server, rather than
from a public gem repository like RubyForge.