Emacs для начинающих


Tutorial-e - часть 10


windows version, makeindex.bat:

@ECHO OFF

REM Copy source file to file with name 'index'. ECHO COPY %1 index copy %1 index IF EXIST index GOTO TAKEENC ECHO copy failed EXIT

REM Guess encoding :TAKEENC ECHO WHATRUS -s %1 whatrus -s %1

REM Branching started from big numbers because REM 'IF ERRORLEVEL = N' is indeed REM 'IF ERRORLEVEL >= N'. IF ERRORLEVEL = 255 GOTO WRERR IF ERRORLEVEL = 14 GOTO MACENC IF ERRORLEVEL = 13 GOTO WINENC IF ERRORLEVEL = 12 GOTO KOIENC IF ERRORLEVEL = 11 GOTO ALTENC ECHO encoding not recognized EXIT

:WRERR ECHO whatrus failed EXIT

REM convert file 'index' to 'index.html'. :ALTENC ECHO RUSCONV -close -alt +win -ext html index rusconv -close -alt +win -ext html index EXIT :KOIENC ECHO RUSCONV -close -alt +win -ext html index rusconv -close -koi +win -ext html index EXIT :MACENC ECHO RUSCONV -close -alt +win -ext html index rusconv -close -mac +win -ext html index EXIT :WINENC ECHO RUSCONV -win -alt +win -ext html index rusconv -close -alt +win -ext html index EXIT

UNIX version for bash, makeindex.sh:

# Copy source file to file with name 'index'. rm -f index cp $1 index if [ ! -f index ] then echo copy failed exit fi

# Guess encoding and convert file to 'index.html' whatrus $1 case $? in 255) echo error executing whatrus;; 0) can''t detect encoding;; 11) rusconv -alt +win -ext html index;; 12) rusconv -koi +win -ext html index;; 13) rusconv -win +win -ext html index;; 14) rusconv -mac +win -ext html index;; esac

 


Have a nice work!

tutorial-e.html

Document created by Oleg A. Paraschenko

Last changes - 15 November 1998





- Начало -  - Назад -  - Вперед -



Книжный магазин