UTF8-skript

Aus EasyVDR Wiki
Wechseln zu: Navigation, Suche

Quelle: [1]

Pfade müssen individuell angepasst werden, utrac und comvmv sollten in der 0.8 enthalten sein.

#!/bin/bash
set -x
########################################
#ISO->UTF-8 Umzug der Bestandsaufnahmen
########################################
# Titelverzeichnisse konvertieren
#if convmv nicht da dann holen
#aptitude install convmv
#fi
#convmv -f iso-8859-15 -t utf-8 -r  /video*/  --notest
convmv -f iso-8859-15 -t utf-8 -r  /videotest*/  --notest
#if utrac nicht da dann holen
#wget utrac.......
#Auspacken nach... /usr/bin
#make 
#make install
#fi
# info.vdr konvertieren
#InfoVdrLst=`find -L "/video0/" -name info.vdr`
InfoVdrLst=`find -L "/videotest0/" -name info.vdr`
echo $InfoVdrLst
count_all_info=0
count_converted_info=0
for I in $InfoVdrLst; do
 ((count_all_info++))
 char_type=`utrac -p -L DE $I`
 echo $char_type
 if [ $char_type != "UTF-8" ] && [ $char_type != "" ]; then
    recode $char_type..utf8 $I    
    ((count_converted_info++))
 fi
done
echo "Von $count_all_info info.vdr sind $count_converted_info nach UTF-8 konvertiert worden."

Download utrac:

wget http://www.easy-vdr.de/~michel8/0.7.14-Patches/Experimentell/utrac-0.3.0.tar.gz

Download convmv:

wget http://www.j3e.de/linux/convmv/convmv-1.14.tar.gz

Installation jeweils mit:

entpacken
make
make install