#!/usr/bin/env bash

# This script allows the user to run the bhl2txt functions without
# needing to start emacs.
 
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of
# the License, or (at your option) any later version.

# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE.  See the GNU General Public License for more details.

# You should have received a copy of the GNU General Public
# License along with this program; if not, write to the Free
# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
# MA 02111-1307 USA

function usage
{
    echo "Usage:  bhl2txt [-l lisp_directory] [-f in_file] [-o out_file]"
    echo
    echo "The lisp_directory is the path to the location of the bhl.el file."
    echo "It defaults to the present working directory."
    echo
    echo "bhl2txt will read from stdin if no in_file is specified, and write"
    echo "to stdout if no out_file is specified."
}

# delegate all the work to bhl2xxx
bhl2xxx $@ txt
