Cldr v0.0.5 Cldr.Downloader
Downloads the CLDR repositoey from the Unicode consortium.
The files are downloaded ./data
directory, unzipped and
converted to JSON.
Summary
Functions
Adds the data directory to the .gitignore
file of the project
if it does not exist
Converts the CLDR repository from XML to JSON using the Unicode
java-based utility ldml2json
Downloads the CLDR repository files
Uses wget
to retrieve the latest version of the CLDR repository
and stores it in the ./data
directory
Functions
Adds the data directory to the .gitignore
file of the project
if it does not exist.
destination_dir
is the name of the data dir,./data
Converts the CLDR repository from XML to JSON using the Unicode
java-based utility ldml2json
.
download_dir
is the location of the downloaded repositorydestination_dir
is the destination for the converted files
Downloads the CLDR repository files.
One task for per file is created which then fetches the file and unzips it. This strategy works because there are less than 5 files to be downloaded.
base_url
is the URL of the Unicode CLDR serverrequired_files
is a list of the files to be downloadeddestination_dir
is the directory of the download destination
Uses wget
to retrieve the latest version of the CLDR repository
and stores it in the ./data
directory.
download_url
is the url of the Unicode CLDR repositorydestination_dir
is the location to store the file. Usually./data
file
is the name of the file to be downloaded from the server