X-Git-Url: http://git.chise.org/gitweb/?p=m17n%2Fm17n-docs.git;a=blobdiff_plain;f=utils%2Fdbformat.sh;h=dc7f913ead080c6ec8fa7860020500964685c411;hp=7376bd5ba8e8daebf5739febf0db06743a0f0cb6;hb=cad045409762492c04a32f1c6a14e930b615549c;hpb=41aaefac13776c8aec6d29d009af0082696ef69d diff --git a/utils/dbformat.sh b/utils/dbformat.sh index 7376bd5..dc7f913 100755 --- a/utils/dbformat.sh +++ b/utils/dbformat.sh @@ -1,6 +1,7 @@ #!/bin/sh cat < EOF -cat $* | grep '@page' | sed -e 's/@page mdb\([^ ]*\)/
  • @ref mdb\1 "\1" --/' +for f in $1/*.txt; do + case $f in + *.ja.txt) ;; + *-tut.txt) ;; + *) cat $f | grep '@page' | sed -e 's/@page mdb\([^ ]*\)/
  • @ref mdb\1 "\1" --/';; + esac +done cat < */ EOF -cat $* | \ +cat < +EOF + +for f in $1/*.txt; do + case $f in + *-tut.txt) ;; + *.ja.txt) cat $f | grep '@page' | sed -e 's/@page mdb\([^ ]*\)/
  • @ref mdb\1 "\1" --/';; + *) ;; + esac +done + +cat < +*/ +EOF + + +for f in $1/*.txt; do + case $f in + *-tut.txt) ;; + *) cat $f | \ sed -n -e '/\/\*\*\*/,/\*\// p' | \ sed -e 's/@section/@subsection/' \ - -e 's/@page/@section/' + -e 's/@page/@section/';; + esac +done + +# Local Variables: +# coding: euc-jp +# End: