From 72f72d64a422d6628c4796f5c0bf2e508f134214 Mon Sep 17 00:00:00 2001 From: Tatsuya Kinoshita Date: Wed, 4 May 2011 16:05:14 +0900 Subject: Adding upstream version 0.5.1 --- w3m-doc/mkdocs | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100755 w3m-doc/mkdocs (limited to 'w3m-doc/mkdocs') diff --git a/w3m-doc/mkdocs b/w3m-doc/mkdocs new file mode 100755 index 0000000..560c2dc --- /dev/null +++ b/w3m-doc/mkdocs @@ -0,0 +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="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_TOP_DIR="html" +DOC_TOP_DIR="doc" +_JA_DIR="ja" +#HTML_DIR="html" +#DOC_DIR="doc" + +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_TOP_DIR} ]; then + mkdir ${DOC_TOP_DIR} + if [ ! -d ${DOC_TOP_DIR}/${_JA_DIR} ]; then + mkdir ${DOC_TOP_DIR}/${_JA_DIR} + fi +fi + +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 -- cgit v1.2.3 From 1d0ba25a660483da1272a31dd077ed94441e3d9f Mon Sep 17 00:00:00 2001 From: Tatsuya Kinoshita Date: Sat, 2 Jan 2021 09:20:37 +0900 Subject: New upstream version 0.5.3+git20210102 --- w3m-doc/mkdocs | 57 --------------------------------------------------------- 1 file changed, 57 deletions(-) delete mode 100755 w3m-doc/mkdocs (limited to 'w3m-doc/mkdocs') diff --git a/w3m-doc/mkdocs b/w3m-doc/mkdocs deleted file mode 100755 index 560c2dc..0000000 --- a/w3m-doc/mkdocs +++ /dev/null @@ -1,57 +0,0 @@ -#!/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="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_TOP_DIR="html" -DOC_TOP_DIR="doc" -_JA_DIR="ja" -#HTML_DIR="html" -#DOC_DIR="doc" - -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_TOP_DIR} ]; then - mkdir ${DOC_TOP_DIR} - if [ ! -d ${DOC_TOP_DIR}/${_JA_DIR} ]; then - mkdir ${DOC_TOP_DIR}/${_JA_DIR} - fi -fi - -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 -- cgit v1.2.3