[BACK]Return to transl.sh CVS log [TXT][DIR] Up to [local] / web

Annotation of web/transl.sh, Revision 1.3

1.1       hako        1: #!/bin/sh
                      2: # Translation of the home page
                      3: # by Hiroshi Hakoyama
                      4: # powered by sintl (by Kristaps Dzonsons)
                      5: # example:
                      6: # cd www
                      7: # transl.sh
                      8:
                      9: # timestamp
                     10: now=`date`
                     11: cat index.xml | (rm index.xml; \
                     12:   sed -e "s/dateModified\">\([^\"]*\)</dateModified\">$now</g" > index.xml)
                     13:
                     14: cp index.xml index.html
                     15:
1.2       hako       16: for iso639 in `ls -F ~/web/keywords/$@ | grep -v /` ; do
1.1       hako       17:   if [ ! -e $iso639 ]; then mkdir $iso639; fi
                     18:   sintl -j ~/web/xlf/${iso639}.xlf index.html > ./${iso639}/index.html
                     19:   descr_en=`cat ./${iso639}/index.html | grep name=\"description\" | \
                     20:     sed -e 's/^.*content=\"//' -e 's/\".*>//'`
                     21:   keywd_en=`cat ./${iso639}/index.html | grep name=\"keywords\" | \
                     22:     sed -e 's/^.*content=\"//' -e 's/\".*>//'`
                     23:   descr_transl=`cat ~/web/description/$iso639`
                     24:   keywd_transl=`cat ~/web/keywords/$iso639`
                     25:   cat ./${iso639}/index.html | (rm ./${iso639}/index.html; \
                     26:     sed -e 2s/en/$iso639/ -e s/"\ its:translate=\"yes\""//g \
                     27:     -e s/"$descr_en"/"$descr_transl"/g -e s/"$keywd_en"/"$keywd_transl"/g \
                     28:     > ./${iso639}/index.html)
                     29: done
                     30:
                     31: # remove sintl tags
                     32: cat index.html | (rm index.html; \
                     33:   sed -e s/"its:translate=\"yes\""//g > index.html)
                     34:
                     35: #ja modifications
                     36: cat ./ja/index.html | (rm ./ja/index.html; \
                     37:   sed -e s/"http:\/\/hako.space\/publications\/"/"http:\/\/hako.space\/ja\/publications\/"/g > ./ja/index.html)
                     38:
                     39: cat ./ja/index.html | (rm ./ja/index.html; \
                     40:   sed -e s/"http:\/\/hako.space\/talks\/"/"http:\/\/hako.space\/ja\/talks\/"/g > ./ja/index.html)
                     41:
                     42: cat ./ja/index.html | (rm ./ja/index.html; \
                     43:   sed -e s/"http:\/\/hako.space\/CV\/"/"http:\/\/hako.space\/ja\/CV\/"/g > ./ja/index.html)
                     44:
                     45: cat ./ja/index.html | (rm ./ja/index.html; \
                     46:   sed -e s/"http:\/\/hako.space\/course\/"/"http:\/\/hako.space\/ja\/course\/"/g > ./ja/index.html)
                     47:
1.3     ! hako       48: cat ./ja/index.html | (rm ./ja/index.html; \
        !            49:   sed -e s/"http:\/\/hako.space\/about\/"/"http:\/\/hako.space\/ja\/about\/"/g > ./ja/index.html)
        !            50:
1.1       hako       51: exit 0