-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add dictionaries from the tibetan-dictionary repo (resolves #75 and #51) #83
Conversation
a discussion (no related file): I have couple questions.
I see some names of English dictionaries are the same as Tibetan ones. So I will extend meta description for these purposes. |
I wrote the script to automate copying over the dictionaries, I ran the script to add the dictonaries to the main folder
All the dictionaries in the |
Some of them or all of them have the same name with different content. |
Ah, which ones should be kept? The |
I ran #!/usr/bin/env bash
SOURCE_DIRECTORY="$1"
TARGET_DIRECTORY="$2"
for source_file in $SOURCE_DIRECTORY/*
do
b_name=$(basename $source_file)
target_file=$TARGET_DIRECTORY/$b_name
if [ -f "$target_file" ]; then
source_hash=$(md5sum $source_file | cut -d ' ' -f 1)
target_hash=$(md5sum $target_file | cut -d ' ' -f 1)
if [ "$source_hash" == "$target_hash" ]; then
echo "$b_name is a duplicate in both directories ($source_hash)"
else
source_size=$(wc -c $source_file | cut -d ' ' -f 1)
target_size=$(wc -c $target_file | cut -d ' ' -f 1)
echo "$b_name is not a duplicate in both directories ($source_hash, $target_hash)"
if ((source_size > target_size)); then
echo " - The file from the first directory is larger"
else
echo " - The file from the second directory is larger"
fi
fi
fi
done All the files from the |
Wait a bit. i remake meta for adding new dictionaries.
They are different. So we need to have all of them by renaming. It needs to take stock of them carefully. |
Hey! What do "T|E" and "T|S" stand for in the file names? |
Tibetan | English and Tibetan | Sanskrit
When you add new dictionary, info about it should be added to titles |
Ran the follwing script as
./add_dictionaries.sh ../tibetan-dictionary/_input/dictionaries/public/ dicts/
Resolves #75 and #51
This change is