File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ function buildChm( $cpp = true )
127127 {
128128 $ e ->parentNode ->removeChild ( $ e );
129129 }
130- else if ( $ e ->getAttribute ('id ' ) == "siteSub " || $ e ->getAttribute ('id ' ) == "mw-js-message " )
130+ else if ( $ e ->getAttribute ('id ' ) == "siteSub " || $ e ->getAttribute ('id ' ) == "mw-js-message " || $ e -> getAttribute ( ' id ' ) == " cpp-footer-base " )
131131 {
132132 $ e ->parentNode ->removeChild ( $ e );
133133 }
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ mkdir -p chm_temp
4343for i in cppreference.{hhc,hhk,hhp}; do
4444sed -i ' /chmhelp\\首页.html/d' " ${i} "
4545mv " ${i} " " chm_temp/${i} "
46- " ${ICONV} " -c -f UTF-8 -t GB18030 " chm_temp/${i} " > " ${i} "
46+ " ${ICONV} " -c -f UTF-8 -t GBK " chm_temp/${i} " > " ${i} "
4747done
4848rm -rf chm_temp
4949
Original file line number Diff line number Diff line change 1+ #! /ban/bash
2+ mv chmhelp chmhelp1
3+ mkdir chmhelp
4+ cd chmhelp1
5+ CPUS=" $( cat /proc/cpuinfo | grep -c ' ^processor' ) "
6+ find -iname ' *.html' | xargs -P " ${CPUS} " sed -i ' s/<meta http-equiv="Content-Type" content="text\/html; charset=utf-8" \/>/<meta http-equiv="Content-Type" content="text\/html; charset=gbk" \/>/'
7+ ls | grep .html | xargs -P " ${CPUS} " -I {} sh -c " iconv -c -f UTF-8 -t GBK '{}' > '../chmhelp/{}'"
8+ cp -n ./* ../chmhelp/
9+ cd ..
10+ rm -rf chmhelp1
You can’t perform that action at this time.
0 commit comments