View Single Post
Old 01-29-2013, 04:57 AM   #26
tshering
Wizard
tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.
 
Posts: 1,301
Karma: 337944
Join Date: Jun 2012
Device: kobo touch
It happens that the Japanese replacement dictionary, or any other replacement dictionary, gets replaced again by the original dictionary during synchronization. This is not really a big problem, but annoying if you are away from your computer and cannot replace it by your custom dictionary.
I therefore did this. I made a folder "customdict" at the device and copied all my replacement dictionaries into it. Next I inserted the following lines into run.sh.
Code:
DICTPATH="/mnt/onboard/.kobo/dict/"
CUSTOMDICTPATH="/mnt/onboard/customdict/"
for f in $CUSTOMDICTPATH*.zip; do
	if [ ! -e "$DICTPATH$(basename "$f")" ]; then
		cp "$f" "$DICTPATH"
	elif [ $(stat -c%s $f) -ne $(stat -c%s $DICTPATH$(basename "$f")) ]; then
		cp "$f" "$DICTPATH"
	fi
done
Every time I power on my KT now, it compares the zip files of the "customdict" folder with those of the ".kobo/dict/" folder. If any of them does not exist in the ".kobo/dict/" folder, or differs in size it gets copied to ".kobo/dict/".
Note: If you would like to do a similar thing you first have to prepare the rcS file in order to run shell commands, cf. this link .
tshering is offline   Reply With Quote