diff options
author | Akinori Ito <aito@fw.ipsj.or.jp> | 2001-11-27 03:54:49 +0000 |
---|---|---|
committer | Akinori Ito <aito@fw.ipsj.or.jp> | 2001-11-27 03:54:49 +0000 |
commit | 8cb9c9554924478f5668f31aeb32bfaf5e7c43de (patch) | |
tree | 8242f847112e50bc200d7cd3e1c259018a7d0acd /w3m-doc/mkdocs | |
parent | [w3m-dev 02537] (diff) | |
download | w3m-8cb9c9554924478f5668f31aeb32bfaf5e7c43de.tar.gz w3m-8cb9c9554924478f5668f31aeb32bfaf5e7c43de.zip |
2001-11-27 aito@fw.ipsj.or.jp
* Error correction on doc-jp/FAQ.html
2001-11-27 sakane@d4.bsd.nes.nec.co.jp (Yoshinobu Sakane)
* w3m-doc update.
Diffstat (limited to 'w3m-doc/mkdocs')
-rwxr-xr-x | w3m-doc/mkdocs | 61 |
1 files changed, 43 insertions, 18 deletions
diff --git a/w3m-doc/mkdocs b/w3m-doc/mkdocs index 72c7b53..560c2dc 100755 --- a/w3m-doc/mkdocs +++ b/w3m-doc/mkdocs @@ -1,32 +1,57 @@ #!/bin/sh +convert() +{ + SRC=$1 + HTML=`echo ${SRC} | ${SED} 's/\.in$//p'` + DOC=`echo ${HTML} | ${SED} 's/\.html$//p' | ${TR} '[a-z]' '[A-Z]'` + echo "converting ${SRC} to ${HTML_TOP_DIR}/${_JA_DIR}/${HTML} ... \c" + ${NKF} -e ${SRC} | ${SED} -e 's/。/./gp' -e 's/、/,/gp' | ${NKF} -j | ${W3MDOC} > ${HTML_TOP_DIR}/${_JA_DIR}/${HTML} + echo "done.\nconverting ${HTML} to ${DOC_TOP_DIR}/${_JA_DIR}/${DOC} ... \c" + ${W3M} -dump -e ${HTML_TOP_DIR}/${_JA_DIR}/${HTML} > ${DOC_TOP_DIR}/${_JA_DIR}/${DOC} + echo "done." +} + W3MDOC="./w3mdoc.pl" -W3M="$HOME/bin/pre_w3m" -#W3M="w3m" +W3M="w3m" +if [ -x ${HOME}/bin/pre_w3m ]; then + W3M=${HOME}/bin/pre_w3m +fi NKF="/usr/local/bin/nkf" SED="/usr/bin/sed" TR="/usr/bin/tr" -HTML_JP_DIR="html-jp" -DOC_JP_DIR="doc-jp" +HTML_TOP_DIR="html" +DOC_TOP_DIR="doc" +_JA_DIR="ja" #HTML_DIR="html" #DOC_DIR="doc" -if [ ! -d ${HTML_JP_DIR} ]; then - mkdir ${HTML_JP_DIR} +if [ ! -d ${HTML_TOP_DIR} ]; then + mkdir ${HTML_TOP_DIR} + if [ ! -d ${HTML_TOP_DIR}/${_JA_DIR} ]; then + mkdir ${HTML_TOP_DIR}/${_JA_DIR} + fi fi -if [ ! -d ${DOC_JP_DIR} ]; then - mkdir ${DOC_JP_DIR} +if [ ! -d ${DOC_TOP_DIR} ]; then + mkdir ${DOC_TOP_DIR} + if [ ! -d ${DOC_TOP_DIR}/${_JA_DIR} ]; then + mkdir ${DOC_TOP_DIR}/${_JA_DIR} + fi fi -for SRC in *.in -do - HTML=`echo ${SRC} | ${SED} 's/\.in$//p'` - DOC=`echo ${HTML} | ${SED} 's/\.html$//p' | ${TR} '[a-z]' '[A-Z]'` - echo "converting ${SRC} to ${HTML_JP_DIR}/${HTML} ... \c" - ${NKF} -e ${SRC} | ${SED} -e 's/。/./gp' -e 's/、/,/gp' | ${NKF} -j | ${W3MDOC} > ${HTML_JP_DIR}/${HTML} - echo "done.\nconverting ${HTML} to ${DOC_JP_DIR}/${DOC} ... \c" - ${W3M} -dump -e ${HTML_JP_DIR}/${HTML} > ${DOC_JP_DIR}/${DOC} - echo "done." -done +if [ $# -eq 0 ]; then + for _IN in *.in + do + convert ${_IN} + done +else + for _IN in $* + do + case ${_IN} in + *.in) convert ${_IN};; + *) ;; + esac + done +fi |