@echo off
color 02
IF EXIST C:\itrans53\html\out.html del C:\itrans53\html\out.html
IF %1!==! GOTO ERROR
IF %2!==! GOTO ERROR
goto %1
:ERROR
Echo The format is txt2html "action" "File"
Echo Where
Echo "action" = txt2Marathi  OR txt2Bengali  OR txt2Guj  OR txt2Tamil  OR txt2Roman
Echo and
Echo "File" = filename.txt
Echo .
pause
goto END
rem ============================================
rem %1 = txt2Marathi
:txt2Marathi
cd\
cd itrans53\Txt
copy %2.txt c:\itrans53\bin\out.txt

copy c:\itrans53\bin\header.tx~+c:\itrans53\bin\out.TXT c:\itrans53\bin\temp.txt
echo ----Now deleting any temporary delatable del*.* Files -----
IF EXIST c:\itrans53\bin\del*.* del c:\itrans53\bin\del*.*
echo ------------------------------------------------------------
cd\
cd itrans53\bin
translit -i c:\itrans53\bin\Temp.txt -o c:\itrans53\bin\del1.txt -t c:\itrans53\bin\itx2iht1.tbl
translit -i c:\itrans53\bin\del1.txt -o c:\itrans53\bin\del2.txt -t c:\itrans53\bin\itx2iht2.tbl
translit -i c:\itrans53\bin\del2.txt -o c:\itrans53\bin\del3.txt -t c:\itrans53\bin\itx2iht3.tbl
copy c:\Itrans53\bin\iht.hdr+c:\itrans53\bin\del3.txt+c:\itrans53\bin\iht.trl c:\itrans53\bin\del.iht
itrans -v -i c:\itrans53\bin\del.iht -o C:\ITRANS53\HTML\out.html
goto SHOWHTML

:SHOWHTML
echo removing %1 extra files....

del c:\itrans53\bin\Temp.txt
del c:\itrans53\bin\out.txt
del c:\itrans53\bin\del*.*
rem --------------------------------------------------------------------------
rem Make sure that the path for iexplore and netscape is correct
rem --------------------------------------------------------------------------
:SCAN
COLOR 02
echo SELECT AN INTERNET BROWSER TO DISPLAY YOUR HTML FILE
echo .
echo          1. NETSCAPE
echo          2. MicroSoft Internet Explorer
echo          3. Microsoft Winword
echo          4. EXIT WITHOUT DISPLAY
echo .
echo   Select 1 through 4

GET
IF ERRORLEVEL 27 IF NOT ERRORLEVEL 28 GOTO END        REM ESCAPE
IF ERRORLEVEL 49 IF NOT ERRORLEVEL 50 GOTO NETSCAPE   REM 1
IF ERRORLEVEL 50 IF NOT ERRORLEVEL 51 GOTO IEXPLORE   REM 2
IF ERRORLEVEL 51 IF NOT ERRORLEVEL 52 GOTO WINWORD    REM 3
IF ERRORLEVEL 52 IF NOT ERRORLEVEL 53 GOTO END        REM 4

GOTO SCAN
rem --------------------------------------------------------------------------
:IEXPLORE
echo Now loading Internet Explorer .........
call "c:\Program Files\Internet Explorer\iexplore" "C:\itrans53\HTML\out.html"
GOTO END
rem --------------------------------------------------------------------------
:NETSCAPE
echo Now loading Netscape Browser .........
call "C:\Program Files\Netscape\Communicator\program\netscape" "C:\itrans53\HTML\out.html"
GOTO END
REM --------------------------------------------------------------------------
:WINWORD
echo Now loading MicroSoft WINWORD
call "C:\Program Files\Microsoft Office\Office\Winword.exe" "C:\itrans53\html\out.html"
GOTO END
REM ----------------------------------------------------------------------------
rem %1 = txt2Bengali
:txt2Bengali
cd\
cd itrans53\Txt
copy %2.txt c:\itrans53\bin\out.txt

copy c:\itrans53\bin\header.tx~+c:\itrans53\bin\out.TXT c:\itrans53\bin\temp.txt
echo ----Now deleting any temporary delatable del*.* Files -----
IF EXIST c:\itrans53\bin\del*.* del c:\itrans53\bin\del*.*
echo ------------------------------------------------------------
cd\
cd itrans53\bin
translit -i c:\itrans53\bin\Temp.txt -o c:\itrans53\bin\del1.txt -t c:\itrans53\bin\itx2iht1.tbl
translit -i c:\itrans53\bin\del1.txt -o c:\itrans53\bin\del2.txt -t c:\itrans53\bin\itx2iht2.tbl
rem  ********** Start bengali files ****************
translit -i c:\itrans53\bin\del2.txt -o c:\itrans53\bin\del3.txt -t c:\itrans53\bin\itx2ihtbeng3.tbl
copy c:\Itrans53\bin\alllangs.hdr+c:\itrans53\bin\del3.txt+c:\itrans53\bin\iht.trl c:\itrans53\bin\del.iht
rem  ********** END bengali files ******************
itrans -v -i c:\itrans53\bin\del.iht -o C:\ITRANS53\HTML\out.html
goto SHOWHTML
rem ===========================================================================
rem %1 = Txt2Guj
:Txt2Guj
cd\
cd itrans53\Txt
copy %2.txt c:\itrans53\bin\out.txt

copy c:\itrans53\bin\header.tx~+c:\itrans53\bin\out.TXT c:\itrans53\bin\temp.txt
echo ----Now deleting any temporary delatable del*.* Files -----
IF EXIST c:\itrans53\bin\del*.* del c:\itrans53\bin\del*.*
echo ------------------------------------------------------------
cd\
cd itrans53\bin
translit -i c:\itrans53\bin\Temp.txt -o c:\itrans53\bin\del1.txt -t c:\itrans53\bin\itx2iht1.tbl
translit -i c:\itrans53\bin\del1.txt -o c:\itrans53\bin\del2.txt -t c:\itrans53\bin\itx2iht2.tbl
rem *************** START GUJARATHI FILES ****************
translit -i c:\itrans53\bin\del2.txt -o c:\itrans53\bin\del3.txt -t c:\itrans53\bin\itx2ihtguj3.tbl
copy c:\Itrans53\bin\ihtguj.hdr+c:\itrans53\bin\del3.txt+c:\itrans53\bin\iht.trl c:\itrans53\bin\del.iht
rem *************** END GUJARATHI FILES ******************
itrans -v -i c:\itrans53\bin\del.iht -o C:\ITRANS53\HTML\out.html
goto SHOWHTML
rem ================================================================
rem %1 = txt2Roman
:txt2Roman
cd\
cd itrans53\Txt
copy %2.txt c:\itrans53\bin\out.txt

copy c:\itrans53\bin\header.tx~+c:\itrans53\bin\out.TXT c:\itrans53\bin\temp.txt
echo ----Now deleting any temporary delatable del*.* Files -----
IF EXIST c:\itrans53\bin\del*.* del c:\itrans53\bin\del*.*
echo ------------------------------------------------------------
cd\
cd itrans53\bin
translit -i c:\itrans53\bin\Temp.txt -o c:\itrans53\bin\del1.txt -t c:\itrans53\bin\itx2iht1.tbl
translit -i c:\itrans53\bin\del1.txt -o c:\itrans53\bin\del2.txt -t c:\itrans53\bin\itx2iht2.tbl

rem **************** START ROMAN ******************
translit -i c:\itrans53\bin\del2.txt -o c:\itrans53\bin\del3.txt -t c:\itrans53\bin\itx2ihtroman3.tbl
copy c:\Itrans53\bin\alllangs.hdr+c:\itrans53\bin\del3.txt+c:\itrans53\bin\iht.trl c:\itrans53\bin\del.iht
rem **************** END   ROMAN ******************

itrans -v -i c:\itrans53\bin\del.iht -o C:\ITRANS53\HTML\out.html
goto SHOWHTML
rem ===============================================================
rem %1 = txt2Tamil
:txt2Tamil
cd\
cd itrans53\Txt
copy %2.txt c:\itrans53\bin\out.txt

copy c:\itrans53\bin\header.tx~+c:\itrans53\bin\out.TXT c:\itrans53\bin\temp.txt
echo ----Now deleting any temporary delatable del*.* Files -----
IF EXIST c:\itrans53\bin\del*.* del c:\itrans53\bin\del*.*
echo ------------------------------------------------------------
cd\
cd itrans53\bin
rem ============ START TAMIL ==================
translit -i c:\itrans53\bin\Temp.txt -o c:\itrans53\bin\del1.txt -t c:\itrans53\bin\itx2tam1.tbl
translit -i c:\itrans53\bin\del1.txt -o c:\itrans53\bin\del2.txt -t c:\itrans53\bin\itx2tam2.tbl
translit -i c:\itrans53\bin\del2.txt -o c:\itrans53\bin\del3.txt -t c:\itrans53\bin\tam2fix.tbl
copy c:\Itrans53\bin\tml-iht1.hdr+c:\itrans53\bin\del3.txt+c:\itrans53\bin\iht.trl c:\itrans53\bin\del.iht
rem ============ END TAMIL ====================

itrans -v -i c:\itrans53\bin\del.iht -o C:\ITRANS53\HTML\out.html
goto SHOWHTML
rem ===============================================================

:END

